From d5b52d44e03af718167a85dcdfa6ee2bb6484a5c Mon Sep 17 00:00:00 2001 From: rocky Date: Thu, 21 Nov 2019 19:39:57 -0500 Subject: [PATCH] Better bytecode detection for Python > 3.0... Not perfect though. More work is needed on the xdis side. --- test/test_pyenvlib.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/test/test_pyenvlib.py b/test/test_pyenvlib.py index 37df5eb3..8049b91f 100755 --- a/test/test_pyenvlib.py +++ b/test/test_pyenvlib.py @@ -80,6 +80,9 @@ for vers in TEST_VERSIONS: else: if vers == "native": short_vers = os.path.basename(sys.path[-1]) + from xdis import PYTHON_VERSION + if PYTHON_VERSION > 3.0: + PYC = "*.cpython-%d.pyc" % int(PYTHON_VERSION * 10) test_options[vers] = (sys.path[-1], PYC, short_vers) else: short_vers = vers[:3]