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',
)

pip install .


python -m demo1

/home/gabor/venv3/lib/python3.10/site-packages/demo1.py


python
>>> import demo1
>>> demo1.whoami()


pip uninstall demo1 --yes


examples/distribution/demo1/.gitignore
build/
demo1.egg-info/