Don't try to use git to find the version number
authorDebian Science Team <debian-science-maintainers@lists.alioth.debian.org>
Mon, 7 Dec 2020 23:06:28 +0000 (23:06 +0000)
committerRebecca N. Palmer <rebecca_palmer@zoho.com>
Mon, 7 Dec 2020 23:06:28 +0000 (23:06 +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 d6584bf4f1c4fce932ba553deb5462051a617b15..8ccbde94202643cc06cdd1e29052277d6a5f916a 100644 (file)
@@ -177,13 +177,7 @@ from pandas.util._tester import test
 import pandas.testing
 import pandas.arrays
 
-# use the closest tagged version if possible
-from ._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
 # TODO: remove Panel compat in 1.0
index caa348d3a1fb93338ffc43039a8b6103fcb2fc59..6760a70675ec9c7df626775938b04c726c8a8aba 100644 (file)
@@ -200,7 +200,7 @@ class TestPDApi(Base):
         "_testing",
         "_tslib",
         "_typing",
-        "_version",
+# not in Debian        "_version",
     ]
 
     def test_api(self):
index bcfed2d0d3a103c2d2426827039554e286ab8f3e..4f4caf531cf355d4a27d7f21b56138f44b1e029c 100644 (file)
@@ -141,7 +141,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__