pypitools package¶
Submodules¶
pypitools.common module¶
This is common pypitools functionality
- pypitools.common.do_prerequisites(packages: List[str] | None = None) None [source]¶
Gather all prerequisites into a single folder
- pypitools.common.upload_by_gemfury() None [source]¶
upload to gemfury
The command line is the one recommended by gemfury at https://manage.fury.io/dashboard/[username]/push
pypitools.configs module¶
Command line configurations for pypitools
- class pypitools.configs.ConfigData[source]¶
Bases:
Config
All parameters for the pypitools module
- check_before_upload = True¶
- clean_after = False¶
- clean_before = False¶
- gemfury_user = None¶
- install_in_user_folder = False¶
- module_name = 'pypitools'¶
- pip = 'pip'¶
- pip_quiet = True¶
- python = 'python'¶
- register_method = 2¶
- requirements = 'requirements.txt'¶
- setup_quiet = True¶
- upload_method = 1¶
- upload_sdist = True¶
- upload_wheel = True¶
- use_sudo = False¶
- wheel_folder = 'wheel'¶
- class pypitools.configs.ConfigOutput[source]¶
Bases:
Config
Parameters to control output
- suppress_warnings = False¶
- verbose = False¶
pypitools.git_utils module¶
pypitools.main module¶
main entry point to the program
- pypitools.main.bump() None [source]¶
This will: - check that all is committed - bump the version - run pydmt build - commit with a standard message - tag with a standard message - push - upload to pypi
- pypitools.main.register() None [source]¶
This function registers your package in pypi.
when registering via twine(1) you need to: - full clean - build wheel using setup.py - twine register - full clean This method works, if you register twice it is ok. You just need to do it once…:)
when registering via setup.py you need to: - full clean - python setup.py register -r pypi - full clean registering the same package many times works. You just need to do it once…:)
References: - https://packaging.python.org/distributing/
TODO: - check if I’m already registered and don’t register if that is the case.
- pypitools.main.upload() None [source]¶
This script uploads your module to where ever you configure it. It’s default is to upload to pypi but you can override by putting a pypi.cnf file in the root of your source tree.
It does the following: - clean - setup.py sdist - twine upload - clean again
Notes: - This script could be done via setuptools using the following: $ python3 setup.py sdist upload -r pypi –identity=”Mark Veltzer” –sign but this has bad security implications as it sends user and password plain text. - we use twine(1) to upload the package. On ubuntu twine(1) is from the ‘twine’ official ubuntu package.
References: - https://pypi.python.org/pypi/twine - https://python-packaging-user-guide.readthedocs.org/en/latest/index.html - http://peterdowns.com/posts/first-time-with-pypi.html
pypitools.name_utils module¶
pypitools.process_utils module¶
pypitools.static module¶
version which can be consumed from within the module