]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Fix out-of-tree build support for multissltest (GH-29694)
authorChristian Heimes <christian@python.org>
Mon, 22 Nov 2021 09:50:53 +0000 (11:50 +0200)
committerGitHub <noreply@github.com>
Mon, 22 Nov 2021 09:50:53 +0000 (10:50 +0100)
Makefile.pre.in
Tools/ssl/multissltests.py

index fc4def8f5d12f62cd53a786a6af4e543fe9f287c..d52f73620795c1e46c1ed9c9169b0b030c95f4c5 100644 (file)
@@ -1709,10 +1709,10 @@ quicktest:      @DEF_MAKE_RULE@ platform
 # SSL tests
 .PHONY: multisslcompile multissltest
 multisslcompile: build_all
-       $(RUNSHARED) ./$(BUILDPYTHON) Tools/ssl/multissltests.py --steps=modules
+       $(RUNSHARED) ./$(BUILDPYTHON) $(srcdir)/Tools/ssl/multissltests.py --steps=modules
 
 multissltest: build_all
-       $(RUNSHARED) ./$(BUILDPYTHON) Tools/ssl/multissltests.py
+       $(RUNSHARED) ./$(BUILDPYTHON) $(srcdir)/Tools/ssl/multissltests.py
 
 install: @FRAMEWORKINSTALLFIRST@ commoninstall bininstall maninstall @FRAMEWORKINSTALLLAST@
        if test "x$(ENSUREPIP)" != "xno"  ; then \
index 7bdfd0b92bacf1e4053c0bdd8841f80046f1646a..ba2663e9a399beaec98317b524354bc29a5814be 100755 (executable)
@@ -153,8 +153,10 @@ class AbstractBuilder(object):
     install_target = 'install'
     jobs = os.cpu_count()
 
-    module_files = ("Modules/_ssl.c",
-                    "Modules/_hashopenssl.c")
+    module_files = (
+        os.path.join(PYTHONROOT, "Modules/_ssl.c"),
+        os.path.join(PYTHONROOT, "Modules/_hashopenssl.c"),
+    )
     module_libs = ("_ssl", "_hashlib")
 
     def __init__(self, version, args):
@@ -357,7 +359,7 @@ class AbstractBuilder(object):
         env["LD_RUN_PATH"] = self.lib_dir
 
         log.info("Rebuilding Python modules")
-        cmd = [sys.executable, "setup.py", "build"]
+        cmd = [sys.executable, os.path.join(PYTHONROOT, "setup.py"), "build"]
         self._subprocess_call(cmd, env=env)
         self.check_imports()
 
@@ -372,7 +374,11 @@ class AbstractBuilder(object):
 
     def run_python_tests(self, tests, network=True):
         if not tests:
-            cmd = [sys.executable, 'Lib/test/ssltests.py', '-j0']
+            cmd = [
+                sys.executable,
+                os.path.join(PYTHONROOT, 'Lib/test/ssltests.py'),
+                '-j0'
+            ]
         elif sys.version_info < (3, 3):
             cmd = [sys.executable, '-m', 'test.regrtest']
         else: