فهرست منبع

test_wheel: temp hack around pypa/pip#6885 to make Win Py3.8 tests pass

A proper fix for this has been merged in pip already (pypa/pip#6874), so this hack will only exist until pip 19.2.3 is out.
rdb 6 سال پیش
والد
کامیت
22833686e3
1فایلهای تغییر یافته به همراه8 افزوده شده و 0 حذف شده
  1. 8 0
      makepanda/test_wheel.py

+ 8 - 0
makepanda/test_wheel.py

@@ -36,6 +36,14 @@ def test_wheel(wheel, verbose=False):
         shutil.rmtree(envdir)
         sys.exit(1)
 
+    # Temp hack to patch issue pypa/pip#6885 in pip 19.2.2 and Python 3.8.
+    if sys.platform == "win32" and "-cp38-cp38-" in wheel and os.path.isdir(os.path.join(envdir, "Lib", "site-packages", "pip-19.2.2.dist-info")):
+        pep425tags = os.path.join(envdir, "Lib", "site-packages", "pip", "_internal", "pep425tags.py")
+        if os.path.isfile(pep425tags):
+            data = open(pep425tags, "r").read()
+            data = data.replace(" m = 'm'\n", " m = ''\n")
+            open(pep425tags, "w").write(data)
+
     # Install pytest into the environment, as well as our wheel.
     if subprocess.call([python, "-m", "pip", "install", "pytest", wheel]) != 0:
         shutil.rmtree(envdir)