From 40fd17e3a2418d54284b53dbcf2ba72dbfbb58ad Mon Sep 17 00:00:00 2001 From: Charles Harris Date: Wed, 2 Dec 2020 13:06:51 -0700 Subject: ENH: Use versioneer to manage numpy versions. The new tags look like '1.21.0.dev0+98.gaa0453721f', where '98' is the number of commits since the 1.21.0 branch was started and 'aa0453721f'. The chosen form may be specified in the 'setup.cfg' file. This PR adds two new files 'numpy/_version.py' and 'numpy/version.py'. The latter is kept because it is part of the public API and is actually used by some downstream projects, but it is no longer dynamically created. See https://github.com/python-versioneer/python-versioneer/ for more information. --- numpy/distutils/misc_util.py | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'numpy/distutils/misc_util.py') diff --git a/numpy/distutils/misc_util.py b/numpy/distutils/misc_util.py index a8e19d52c..d3073ab2d 100644 --- a/numpy/distutils/misc_util.py +++ b/numpy/distutils/misc_util.py @@ -1968,6 +1968,13 @@ class Configuration: version = getattr(version_module, a, None) if version is not None: break + + # Try if versioneer module + try: + version = version_module.get_versions()['version'] + except AttributeError: + version = None + if version is not None: break -- cgit v1.2.1