FIX: Anaconda and PYPI automatic deployment #109
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
PYPI was not accepting
sdist
uploads based on incorrect version format. Version format was being taken directly fromgit describe
output, giving version numbers such as1.0.3-4-ga36bedb
, which are not valid under the PEP 440 version number specification (https://www.python.org/dev/peps/pep-0440/). This was preventing upload to PYPI withtwine
, resulting inHTTP 400
errors.The new auto-version format still uses
git describe
but now parses it so that the new version number bumps the tag version by one, and adds adev
specifier to the end which represents the number of commits the build is ahead of the previous tag. For example, if the previous tag was1.0.3
and the current build is 5 commits ahead of the tag then the new version number will be1.0.4.dev5
To get this version in the
meta.yaml
file for the conda build, I now use jinja templating with{% data = load_setup_py_data() %}