-
Notifications
You must be signed in to change notification settings - Fork 296
Developer Doc: Creating a New Release
Comment out use_scm_version=True
and add version="x.y.z",
just below it.
Change the version number in the __init__.py
file in the root cadquery
directory: __version__ = "x.y-dev"
becomes __version__ = "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:
5. 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.
7. 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.
8. 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.
temporary placeholder for this step - please check and complete for 2.2
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.
Uncomment use_scm_version=True
and comment out the version="x.y.z",
entry that is just below it.