-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: version string #101
fix: version string #101
Conversation
Also, clean up meta.yaml to align better with conda-forge recipe
c324618
to
3df1b6a
Compare
Codecov Report
@@ Coverage Diff @@
## main #101 +/- ##
=======================================
Coverage 96.63% 96.63%
=======================================
Files 9 9
Lines 742 742
=======================================
Hits 717 717
Misses 25 25
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
Using a git archive doesn't seem to work, so I've reverted those changes: https://github.com/pypa/setuptools_scm#git-archives However, I have confirmed that we can publish the source tarball to pypi.org and then build the conda package from that. We may have an opportunity for some more work in the future to enable building the conda package from the released git tarball, but for now let's plan to build from pypi.org. |
Fixes the dynamic loading of package version in the installed package.
We use
setuptools-scm
to write the version to the filesrc/conda_project/_version.py
. This file is not to be checked into git.We then dynamically import this file into the global
conda_project.__version__
.This file will be generated both during
pip install -e .
, as well as when generating the source distribution for PyPI viapython -m build
.If there is any error importing the
_version.py
file, the version number will be set to"unknown"
.A test has been added to the conda recipe to ensure that the version of the built package is correct.