Skip to content

Commit

Permalink
limit python to windows 7+
Browse files Browse the repository at this point in the history
  • Loading branch information
CyanoHao committed Dec 17, 2024
1 parent d252188 commit e0bd1f0
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion module/cross_compiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -308,6 +308,6 @@ def build_cross_compiler(ver: BranchVersions, paths: ProjectPaths, info: Profile

gcc.__next__()

if ver.python:
if ver.python and info.host_winnt >= 0x0601:
_python_z(ver, paths, info, config.jobs)
_python(ver, paths, info, config.jobs)
14 changes: 7 additions & 7 deletions module/mingw_toolchain.py
Original file line number Diff line number Diff line change
Expand Up @@ -288,8 +288,8 @@ def _python(ver: str, paths: ProjectPaths, info: ProfileInfo, jobs: int):
if res.returncode != 0:
raise Exception('xmake install failed')

def _gdb(ver: str, python_ver: Optional[str], paths: ProjectPaths, info: ProfileInfo, jobs: int):
v = Version(ver)
def _gdb(ver: BranchVersions, paths: ProjectPaths, info: ProfileInfo, jobs: int):
v = Version(ver.gdb)
build_dir = paths.gdb / 'build'
ensure(build_dir)

Expand All @@ -301,7 +301,7 @@ def _gdb(ver: str, python_ver: Optional[str], paths: ProjectPaths, info: Profile
f'--with-libmpfr-prefix={paths.dep}',
]

if python_ver:
if ver.python and info.host_winnt >= 0x0601:
python_flags = [f'--with-python={paths.dep}/python-config.sh']
else:
python_flags = []
Expand Down Expand Up @@ -411,7 +411,7 @@ def _licenses(ver: BranchVersions, paths: ProjectPaths, info: ProfileInfo):
ensure(license_dir / 'mpfr')
copyfile(paths.mpfr / 'COPYING.LESSER', license_dir / 'mpfr' / 'COPYING.LESSER')

if ver.python:
if ver.python and info.host_winnt >= 0x0601:
ensure(license_dir / 'python')
copyfile(paths.python / 'LICENSE', license_dir / 'python' / 'LICENSE')

Expand Down Expand Up @@ -440,14 +440,14 @@ def build_mingw_toolchain(ver: BranchVersions, paths: ProjectPaths, info: Profil

_gcc(ver.gcc, paths, info, config.jobs)

if ver.python:
if ver.python and info.host_winnt >= 0x0601:
_python(ver.python, paths, info, config.jobs)

_gdb(ver.gdb, ver.python, paths, info, config.jobs)
_gdb(ver, paths, info, config.jobs)

_gmake(ver.make, paths, info, config.jobs)

if ver.python:
if ver.python and info.host_winnt >= 0x0601:
_python_packages(ver, paths, info, config)

_licenses(ver, paths, info)
2 changes: 1 addition & 1 deletion module/prepare_source.py
Original file line number Diff line number Diff line change
Expand Up @@ -408,5 +408,5 @@ def download_and_patch(ver: BranchVersions, paths: ProjectPaths, info: ProfileIn
_mingw(ver.mingw, info, paths)
_mpc(ver.mpc, info, paths)
_mpfr(ver.mpfr, info, paths)
if ver.python:
if ver.python and info.host_winnt >= 0x0601:
_python(ver, info, paths)

0 comments on commit e0bd1f0

Please sign in to comment.