Skip to content

Latest commit

 

History

History
27 lines (24 loc) · 1.23 KB

pypi_package_tips.md

File metadata and controls

27 lines (24 loc) · 1.23 KB

build and upload commands

  • install dependencies: pip install twine wheel
  • to build package localy: python setup.py bdist_wheel
  • to check dist before upload: python -m twine check dist/*
  • to upload package to test pypi: python -m twine upload --repository testpypi dist/*
  • to upload package to pypi: python -m twine upload dist/*
  • to install localy: python setup.py install
  • to install with pip: pip install package_name
  • to update dist: python setup.py sdist
  • to create dist in specified format: python setup.py sdist --formats=gztar,zip

related stuff

  • if you want to add non-python files to dist, include it in MANIFEST.in. Example below:
# Include the data files
recursive-include happy_couple/lines_only *
recursive-include happy_couple/sounds *
  • if you want to add non-python file to site-packages directory in your python, specify it in setup.py. Example below:
'happy_couple': ['sounds/smb_jump.wav', 'lines_only/small_head.png'],	# for single file
'happy_couple': images + sounds,					# for predefined list of files