(self)
| 364 | raise ValueError(version) |
| 365 | |
| 366 | def recompile_pymods(self): |
| 367 | log.warning("Using build from {}".format(self.build_dir)) |
| 368 | # force a rebuild of all modules that use OpenSSL APIs |
| 369 | for fname in self.module_files: |
| 370 | os.utime(fname, None) |
| 371 | # remove all build artefacts |
| 372 | for root, dirs, files in os.walk('build'): |
| 373 | for filename in files: |
| 374 | if filename.startswith(self.module_libs): |
| 375 | os.unlink(os.path.join(root, filename)) |
| 376 | |
| 377 | # overwrite header and library search paths |
| 378 | env = os.environ.copy() |
| 379 | env["CPPFLAGS"] = "-I{}".format(self.include_dir) |
| 380 | env["LDFLAGS"] = "-L{}".format(self.lib_dir) |
| 381 | # set rpath |
| 382 | env["LD_RUN_PATH"] = self.lib_dir |
| 383 | |
| 384 | log.info("Rebuilding Python modules") |
| 385 | cmd = ["make", "sharedmods", "checksharedmods"] |
| 386 | self._subprocess_call(cmd, env=env) |
| 387 | self.check_imports() |
| 388 | |
| 389 | def check_imports(self): |
| 390 | cmd = [sys.executable, "-c", "import _ssl; import _hashlib"] |
no test coverage detected