-
Notifications
You must be signed in to change notification settings - Fork 295
Developer Doc: Creating a New Release
Update the version string: `version="x.y.z".
Change the version number in the __init__.py
file in the root cadquery
directory: __version__ = "x.y-dev"
becomes __version__ = "x.y.z"
Update the sphinx doc short and full version strings. version="x.y"
release="x.y.z"
.
All of the changes since the last release need to be documented.
Create a PR for the release changes to give other devs and the broader community the opportunity to comment.
Just what the section title says.
Publish to PyPI reference
Change to the root of your local copy of the CadQuery repo.
- Make sure pip is the latest version.
pip install --upgrade pip
- Install the latest build package from PyPA.
pip install --upgrade build
- Perform the build.
python -m build
- Make sure that a dist directory was created with a
.tar.gz
file in it and a.whl
file.
ls dist
Example listing for CadQuery version 2.2.0:
-
Ensure that the dependencies are included by opening the wheel file with an archive manager and making sure that all of CadQuery's dependencies are included in
cadquery-2.x.y.dist-info/METADATA
asRequires-Dist
directives. If they are not, try creating a fresh venv environment and retry the build. Do not use conda for building PyPI release packages. -
Install the latest version of the twine package.
pip install --upgrade twine
- Upload the dist to testpypi first to make sure the upload works correctly.
python -m twine upload --repository testpypi dist/*
You will be asked for a username and password. For the username use __token__
and for the password use the token you have generated at testpy under your user account settings.
- Create a virtual environment and do a test install of the newly created release.
pip install --index-url https://test.pypi.org/simple/ --no-deps cadquery
You have to use --no-deps
because the dependency packages are not available on TestPyPI.
If everything worked without errors, you can now upload to the real PyPI.
- Upload to the real PyPI
python -m twine upload dist/*
Test this final release in a virtual environment, and if there are no errors, you are done.
A Release should be created through the GitHub interface, and that release should be set to create a tag with the version number when it is published. So for CadQuery 2.2.0, the tag would be 2.2.0
. The title of the release can be something simple, like CadQuery 2.x.y
.
Tagging the release will automatically build the conda packages.
Example: __version__ = "2.2.0"
would be become __version__ = "2.3-dev"
to start next release cycle.
Review the installation instructions and update as necessary. Update/remove out of date references to "latest" release version. Check for out of date OCCT version pins.