From ae8a195894b10db80ec2afa17f69953c60e3639c Mon Sep 17 00:00:00 2001 From: Michael Helmling Date: Sat, 16 Mar 2024 22:19:40 +0100 Subject: [PATCH] build scripts: simplify output directory handling Note: the scripts still work on 32-bit! --- build_taglib.py | 9 +++------ setup.py | 4 +--- 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/build_taglib.py b/build_taglib.py index 83c40f7..1ead703 100644 --- a/build_taglib.py +++ b/build_taglib.py @@ -9,8 +9,6 @@ from argparse import ArgumentParser from pathlib import Path -is_x64 = sys.maxsize > 2 ** 32 -arch = "x64" if is_x64 else "x32" system = platform.system() python_version = platform.python_version() python_implementation = sys.implementation.name @@ -27,7 +25,7 @@ class Configuration: def __init__(self): self.build_path = here / "build" - self.tl_install_dir = self.build_path / "taglib" / f"{system}-{arch}-{python_implementation}-{python_version}" + self.tl_install_dir = self.build_path / "taglib" / f"{system}-{python_implementation}-{python_version}" self.clean = False @property @@ -116,8 +114,7 @@ def cmake_config(config: Configuration): print("running cmake ...") args = ["-DWITH_ZLIB=OFF"] # todo fix building wheels with zlib support if system == "Windows": - cmake_arch = "x64" if is_x64 else "Win32" - args += ["-A", cmake_arch] + args += ["-A", "x64"] elif system == "Linux": args.append("-DCMAKE_POSITION_INDEPENDENT_CODE=ON") args.append(f"-DCMAKE_INSTALL_PREFIX={config.tl_install_dir}") @@ -166,7 +163,7 @@ def parse_args() -> Configuration: def run(): - print(f"building taglib on {system}, arch {arch}, for python {python_version} ...") + print(f"building taglib on {system}, for {python_implementation} {python_version} ...") config = parse_args() tag_lib = ( config.tl_install_dir diff --git a/setup.py b/setup.py index 1865a08..97c9e68 100644 --- a/setup.py +++ b/setup.py @@ -15,13 +15,11 @@ from Cython.Build import cythonize from setuptools import setup, Extension -is_x64 = sys.maxsize > 2 ** 32 -arch = "x64" if is_x64 else "x32" system = platform.system() python_version = platform.python_version() python_implementation = sys.implementation.name here = Path(__file__).resolve().parent -default_taglib_path = here / "build" / "taglib" / f"{system}-{arch}-{python_implementation}-{python_version}" +default_taglib_path = here / "build" / "taglib" / f"{system}-{python_implementation}-{python_version}" src = Path("src")