Version support
Merge request reports
Activity
I like to use
use_scm_version={"write_to": "path/to/_version.py"}
insetup.py
, which will havesetup.py install/build/etc
write the git-tag derived version to the file system (/path/to/_version.py
should also not be version controlled). That means tagged releases get a clean version like0.1.0
but local checkouts with modifications get e.g.0.1.0.dev1923+g475d04d2
so it's clear it's non-released code.@sean-leavey The problem with using setuptools_scm is that it doesn't hold the version in the source itself, so a tarball of the source (like what's available directly through gitlab) can not be used as an official source release tarball, and release tarballs need to be generated and held elsewhere.
If we upload to pypi we could use the that as the official source release link though...
Fair point. The nuclear approach to prevent use of the tarball could be to have something like this in
gwinc.__init__.py
:# Set version. try: from ._version import version as __version__ except ImportError: # No _version.py file is present, which probably means the user tried to run the source tarball directly. raise Exception("Please install pygwinc via an official distribution.")
added 8 commits
-
d11021f0...77cd32f8 - 7 commits from branch
gwinc:master
- 7c53dc1d - update setuptools config and create version support
-
d11021f0...77cd32f8 - 7 commits from branch
added 1 commit
- fab24e1d - update setuptools config and create version support
added 1 commit
- 8ff5cdb3 - update setuptools config and create version support
I think that perhaps
try: from ._version import __version__ except ModuleNotFoundError: import setuptools_scm __version__ = setuptools_scm.get_version()
should go into a version.py which is NOT automatically imported with
__init__.py
so that it doesn't have to be called every time on devel versions.Edited by Lee McCulleradded 21 commits
-
8ff5cdb3...c86cde7e - 20 commits from branch
gwinc:master
- 3c31c23b - update setuptools config and create version support
-
8ff5cdb3...c86cde7e - 20 commits from branch
added 11 commits
-
3c31c23b...aed85d9e - 10 commits from branch
gwinc:master
- 2d3a44f8 - update setuptools config and create version support
-
3c31c23b...aed85d9e - 10 commits from branch
mentioned in commit 9cc69475