crossenv
Advanced tools
| Metadata-Version: 2.1 | ||
| Name: crossenv | ||
| Version: 1.3.0 | ||
| Version: 1.4.0 | ||
| Summary: A cross-compiling tool for Python extension modules | ||
@@ -5,0 +5,0 @@ Home-page: https://github.com/benfogle/crossenv |
+24
-2
@@ -22,3 +22,3 @@ import venv | ||
| __version__ = '1.3.0' | ||
| __version__ = '1.4.0' | ||
@@ -232,2 +232,14 @@ logger = logging.getLogger(__name__) | ||
| def _is_python_source_dir(self, d): | ||
| fn = getattr(sysconfig, '_is_python_source_dir', None) | ||
| if fn: | ||
| return fn(d) | ||
| # removed in python 3.11 | ||
| for fn in ("Setup", "Setup.local"): | ||
| if os.path.isfile(os.path.join(d, "Modules", fn)): | ||
| return True | ||
| return False | ||
| def find_host_python(self, host): | ||
@@ -250,3 +262,3 @@ """ | ||
| if sysconfig._is_python_source_dir(self.host_project_base): | ||
| if self._is_python_source_dir(self.host_project_base): | ||
| self.host_makefile = os.path.join(self.host_project_base, 'Makefile') | ||
@@ -702,2 +714,12 @@ pybuilddir = os.path.join(self.host_project_base, 'pybuilddir.txt') | ||
| # In python 3.11, the import machinery imports from math, which breaks | ||
| # in our cross environment.. so we inject lib-dynload to the path also | ||
| dynload = os.path.join(stdlib, "lib-dynload") | ||
| # In python 3.11, several system packages are frozen by default, which | ||
| # prevents us from patching it. Disable it. | ||
| xopt = subprocess.run([context.build_env_exe, "--help-xoptions"], | ||
| stdout=subprocess.PIPE, stderr=subprocess.PIPE) | ||
| disable_frozen_modules = (b'frozen_modules=' in xopt.stdout) | ||
| context.sentinel = random.randint(0,0xffffffff) | ||
@@ -704,0 +726,0 @@ |
@@ -20,3 +20,3 @@ #!{{context.build_env_exe}} -I | ||
| oldpath = os.environ.get('PYTHONPATH') | ||
| newpath = os.pathsep.join([{{repr(context.lib_path)}}, {{repr(stdlib)}}]) | ||
| newpath = os.pathsep.join([{{repr(context.lib_path)}}, {{repr(stdlib)}}, {{repr(dynload)}}]) | ||
| if oldpath: | ||
@@ -43,3 +43,6 @@ path = os.pathsep.join([newpath, oldpath]) | ||
| if {{repr(disable_frozen_modules)}}: | ||
| sys.argv[1:1] = ["-X", "frozen_modules=off"] | ||
| # This will fix up argv0 so that sys.executable will be correct | ||
| os.execv({{repr(context.build_env_exe)}}, sys.argv) |
+1
-1
| Metadata-Version: 2.1 | ||
| Name: crossenv | ||
| Version: 1.3.0 | ||
| Version: 1.4.0 | ||
| Summary: A cross-compiling tool for Python extension modules | ||
@@ -5,0 +5,0 @@ Home-page: https://github.com/benfogle/crossenv |
Alert delta unavailable
Currently unable to show alert delta for PyPI packages.
98614
1.01%1106
1.56%