- the code is from https://www.tutorialsteacher.com/python/python-package
- the document refers to https://packaging.python.org/en/latest/tutorials/packaging-projects/
- usage of setup.py, setup.cfg, pyproject.toml:
Open a command ternimal, and then switch to the project directory(where setup.py
is). Then use the command below to install
pip install mypackage
py -m build
then it will create a folder dist
and a folder mypackage.egg-info
- there are
*.tar.gz
and*.whl
in the folderdist
pip install wheel_name.whl
There is a demo:
test.py
in this folder