-
Notifications
You must be signed in to change notification settings - Fork 111
Maintainers Build Test and Distribute
Sumio Kiyooka edited this page Apr 16, 2021
·
3 revisions
You should be using virtualenv, virtrualenvwrapper to make things easy on yourself.
Ref: Packaging Python Projects Tutorial
To build both the source distribution package and the wheel package:
pip3 install -r requirements.txt
python3 setup.py sdist bdist_wheel
Using pytest
git clone https://github.com/blackducksoftware/hub-rest-api-python.git
cd hub-rest-api-python
# optional but advisable: create/use virtualenv
# you should have 3.x+, e.g. Python 3.7.0
pip3 install -r requirements.txt
pip3 install .
cd test
pytest
Requires you have an account on either/both PyPi and Test PyPi AND you must be a package maintainer.
Send a request to gsnyder@synopsys.com or gsnyder2007@gmail.com if you want to be listed as a package maintainer.
Upload to PyPI:
twine upload dist/*
Then try installing it from PyPI
pip3 install blackduck
Upload to Test PyPI:
twine upload --repository-url https://test.pypi.org/legacy/ dist/*
Then try installing it from Test PyPI
pip install --index-url https://test.pypi.org/simple/ blackduck
Do this when testing a new version.
git clone https://github.com/blackducksoftware/hub-rest-api-python.git
cd hub-rest-api-python
pip3 install -r requirements.txt
pip3 install .
pip3 uninstall blackduck