Distribution demo 2
- The name of the package (demo2a in setup.py) and the name of the module (the filename demo2b.py ) don't neet to be the same.
- The name of the folder (demo2)
examples/distribution/demo2/demo2b.py
def whoami(): print(__file__) if __name__ == "__main__": whoami()
examples/distribution/demo2/setup.py
from distutils.core import setup setup( name='demo2a', version='1.0', )
- Install:
pip install .
- Use the name of the module
python -m demo2b
- Uninstall using the package name
pip uninstall demo2a --yes