Skip to content

Instantly share code, notes, and snippets.

@josemotta
Last active March 1, 2019 00:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save josemotta/838239ee05dcbfb36458a016622c1f76 to your computer and use it in GitHub Desktop.
Save josemotta/838239ee05dcbfb36458a016622c1f76 to your computer and use it in GitHub Desktop.
https://packaging.python.org/tutorials/packaging-projects/
SETUP TOOLS
python3 -m pip install --user --upgrade setuptools wheel
python3 -m pip install --user --upgrade twine
ADJUST PATH
export PATH=/home/pi/.local/bin:$PATH
$ echo $PATH
/home/pi/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/games:/usr/games
$ twine --version
twine version 1.12.1 (pkginfo: 1.5.0.1, requests: 2.21.0, setuptools: 40.6.3,
requests-toolbelt: 0.8.0, tqdm: 4.29.0)
cd ~/vl53l1x-python
pi@lumi:~/vl53l1x-python $ make
pi@lumi:~/vl53l1x-python $ python3 setup.py sdist bdist_wheel
pi@lumi:~/vl53l1x-python $ twine upload --repository-url https://test.pypi.org/legacy/ dist/*
Enter your username: josemotta
Enter your password:
Uploading distributions to https://test.pypi.org/legacy/
Uploading VL53L1X2-0.1.0-cp35-cp35m-linux_armv7l.whl
....
INSTALL PACKAGE
python3 -m pip install VL53L1X2
AFTER ANY CHANGES, CREATE NEW VERSION
pi@lumi:~/vl53l1x-python $ nano setup.py // change version number
pi@lumi:~/vl53l1x-python $ python3 setup.py sdist bdist_wheel
pi@lumi:~/vl53l1x-python $ python3.6 setup.py sdist bdist_wheel
pi@lumi:~/vl53l1x-python $ twine upload dist/*
INSTALLING 3.7 VERSION
python3.7 -m pip install --user --upgrade setuptools wheel
python3.7 -m pip install --user --upgrade twine
export PATH=/home/pi/.local/bin:$PATH
echo $PATH
python3.7 -V
twine --version
git clone https://github.com/josemotta/vl53l1x-python.git
cd ~/vl53l1x-python
make
python3.7 setup.py sdist bdist_wheel
twine upload dist/*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment