pyenv
helps to manage different Python installations side by side.
Note: Currently, not in use.
Example:
$ pyenv install 3.11.0
$ pyenv install 3.10.0
$ pyenv install 3.9.0
$ pyenv install 3.8.0
$ pyenv local 3.11.0 3.10.0 3.9.0 3.8.0
$ python --version
Python 3.8.0
For development it is preferable to install manifest-tool
package in
"editable mode" (a.k.a "developer mode") by:
$ pip install -editable .
A helper script for bootstrapping development environment.
Usage:
$ source dev_init.sh
$ manifest-dev-tool --version
Manifest-Tool version 2.0
Same as dev_init.sh
but for Windows
-
execute
pytest
command to verify no regression was introduced.pytest
will also generatehtmlcov/index.html
that can be opened in a browser for showing test coverage statistics. -
Example of running only one test:
pytest tests/dev_tool/test_dev_update.py -o log_cli=true -k test_cli_update_happy_day[fw_file-True-action0]
tox
is an automation tool. Details can be found here:
https://tox.readthedocs.io/en/latest/
tox
helps to automate testing on different python versions.
Execute: tox
command to test all supported Python environments.
Execute tox -e py38
to test only the python3.8 environment.
$ pyenv local 3.9.0
$ python setup.py bdist_wheel
$ pyenv local 3.8.9
$ python setup.py bdist_wheel
do the same on each platform (Windows, Linux, macOS) per Python interpreter.
The resulting wheel packages will be found under dist
directory.
Note: all the packages are created automatically by running
tox
command.
Source distribution - can be done once as it is platform and Python version agnostic.
python setup.py sdist
the resulting archive (tar.gz
) will be found under dist
directory
Note: all the packages are created automatically by running
tox
command.
PyPi does not allow uploading platform-specific wheels. More details can be found here: PEP-0513.
To create manylinux wheel files
execute the following script: ./build_manylinux_wheels.sh
.
Note: this will require the
docker
command. Make sure you have installed docker.
Dependent package versions should be tested with both lower and higher
bounds. Tox tests with new virtual env where all the latest versions will
be installed.
When issuing a new release:
- test lower bound versions - if they are still applicable to latest changes.
- bump the higher bound versions and test against them.
We must freeze upper-bound versions to the version which were tested at the release creation time.
- In the
manifest-tool-internal
repository:- Update
requirements.txt
to dependencies latest version. - Bump the package version and tar name in tox.ini.
- Create a PR with the above changes and merge it to the master branch.
- Check that the
PR-checker
workflow passes on the master branch. It runs all the tox tests on all the OSes. - Check that the
create-Linux-wheels
workflow passes on the master branch. It builds the Linux wheels.
- Update
- Compare manually between the
manifest-tool-internal
repo and themanifest-tool
repo. Copy the required changes to themanifest-tool
repo. - In the
manifest-tool
repository:- Create a PR with the changes to master. Merge it after successful PR checks and approval.
- Check that the
PR-checker
workflow passes on the master branch. It runs all the tox tests on all the OSes. - Check that the
create-Linux-wheels
workflow passes on the master branch. It builds the Linux wheels and uploads them as an artifact. - Download the
wheels-manylinux.zip
andwheels-tar-gz.zip
artifacts to your local machine from thecreate-Linux-wheels
workflow. - Extract both zip files to a
<dist-folder>
folder. - Install
twine
:pip install twine
. - Publish to https://test.pypi.org and check:
twine upload -r testpypi <dist-folder>/*
- Publish to https://pypi.org:
twine upload <dist-folder>/*
- Yank older pre-releases in https://pypi.org/manage/project/manifest-tool/releases/
- Close fixed issues
- Create a tag and a release in
manifest-tool-internal
andmanifest-tool
repos.