snu-quiqcl / qiwis

QuIqcl Widget Integration Software
MIT License
6 stars 2 forks source link

Create setup.py to release as package #61

Closed BECATRUE closed 1 year ago

BECATRUE commented 1 year ago

Discussed in https://github.com/snu-quiqcl/swift/discussions/58

Originally posted by **BECATRUE** March 9, 2023 In order to __release__ this project, we need to package it. For this, `python` offers `pip` for custom packages using `setup.py`. I referred to [this](https://velog.io/@rhee519/python-project-packaging-setuptools). The documentation is [here](https://setuptools.pypa.io/en/latest/userguide/package_discovery.html). To summarize, write `setup.py` as below. ```python from setuptools import setup, find_packages setup( name='swift', version='0.1.0', packages=find_packages(include=['swift', 'swift.*']), install_requires=[ 'numpy==1.14.5', 'matplotlib>=2.2.0', ] ) ``` Thus, we can install this package like below. ```console pip install -e ${directory of setup.py} ```