Distribution demo 1
examples/distribution/demo1/demo1.py
def whoami(): print(__file__) if __name__ == "__main__": whoami()
examples/distribution/demo1/setup.py
from distutils.core import setup setup( name='demo1', version='1.0', )
- Install from the current folder
pip install .
- Use it on the command line: (try it in a different folder!)
python -m demo1 /home/gabor/venv3/lib/python3.10/site-packages/demo1.py
- Use it in the interactive shell
python >>> import demo1 >>> demo1.whoami()
- Uninstall (without asking questions)
pip uninstall demo1 --yes
examples/distribution/demo1/.gitignore
build/ demo1.egg-info/