Don't try to use git to find the version number
authorDebian Science Team <debian-science-maintainers@lists.alioth.debian.org>
Tue, 11 Jan 2022 21:25:17 +0000 (21:25 +0000)
committerRebecca N. Palmer <rebecca_palmer@zoho.com>
Tue, 11 Jan 2022 21:25:17 +0000 (21:25 +0000)
Needed as Debian buildds use tarballs

Author: Yaroslav Halchenko
Forwarded: not-needed

Gbp-Pq: Name deb_nonversioneer_version.patch

pandas/__init__.py
pandas/tests/api/test_api.py
pandas/tests/test_common.py

index db4043686bcbb0bbe597209968754c3246e3cb08..0b04e1e08a425b214bbd834fc614a3f68234328f 100644 (file)
@@ -179,13 +179,7 @@ from pandas.util._tester import test
 import pandas.testing
 import pandas.arrays
 
-# use the closest tagged version if possible
-from pandas._version import get_versions
-
-v = get_versions()
-__version__ = v.get("closest-tag", v["version"])
-__git_version__ = v.get("full-revisionid")
-del get_versions, v
+from .__version import version as __version__
 
 
 # GH 27101
index 38984238ecf651ab79d50e86a51c2ba849653bc5..3daf069c04e3d60451b5f3e6886817e1289120b1 100644 (file)
@@ -198,7 +198,7 @@ class TestPDApi(Base):
         "_testing",
         "_tslib",
         "_typing",
-        "_version",
+# not in Debian        "_version",
     ]
 
     def test_api(self):
index 12664e44633431a0f8f1d717b8a037614dc8c529..8a279306d81944550545d9981e0d48e79d632bab 100644 (file)
@@ -133,7 +133,7 @@ def test_standardize_mapping():
     dd = collections.defaultdict(list)
     assert isinstance(com.standardize_mapping(dd), partial)
 
-
+@pytest.mark.xfail(reason="deb_nonversioneer_version patch")
 def test_git_version():
     # GH 21295
     git_version = pd.__git_version__