creating the package

cd [dir containing pack setup]
python3 setup.py sdist

Installation

pip3 install --user pack

creating the PyPi distribution

see https://packaging.python.org/tutorials/packaging-projects/

  • create virtual env (recommended)

  • install pypi tools

pip install --upgrade pip
pip install --upgrade wheel setuptools  twine
  • Now run this from the same directory where setup.py is located:

python3 setup.py sdist bdist_wheel
  • run Twine to upload all of the archives under dist:

twine upload --repository-url https://test.pypi.org/legacy/ dist/\*
pip3 install --index-url https://test.pypi.org/simple/ labpy
  • if tests are successful, install everything for real ….

twine upload dist/\*