diff --git a/.circleci/config.yml b/.circleci/config.yml index fc5499d..92eceab 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -18,7 +18,7 @@ jobs: CIBW_ARCHS: aarch64 command: | - python3 -m pip install cibuildwheel==2.21.3 + python3 -m pip install cibuildwheel==2.22.0 python3 -m cibuildwheel --output-dir wheelhouse - store_artifacts: path: wheelhouse/ diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml index 4cf86de..8751d99 100644 --- a/.github/workflows/wheels.yml +++ b/.github/workflows/wheels.yml @@ -94,23 +94,23 @@ jobs: platform_id: macosx_arm64 # MacOS 64 bit Intel: x86_64 - - os: macos-12 + - os: macos-13 bitness: 64 python: 39 platform_id: macosx_x86_64 - - os: macos-12 + - os: macos-13 bitness: 64 python: 310 platform_id: macosx_x86_64 - - os: macos-12 + - os: macos-13 bitness: 64 python: 311 platform_id: macosx_x86_64 - - os: macos-12 + - os: macos-13 bitness: 64 python: 312 platform_id: macosx_x86_64 - - os: macos-12 + - os: macos-13 bitness: 64 python: 313 platform_id: macosx_x86_64 @@ -158,7 +158,7 @@ jobs: cd C:\\rdkit echo "C:\\libs" >> $GITHUB_PATH fi - python -m pip install cibuildwheel==2.21.3 + python -m pip install cibuildwheel==2.22.0 python -m cibuildwheel --output-dir wheelhouse shell: bash diff --git a/README.md b/README.md index 4c5487f..eeb3e9c 100644 --- a/README.md +++ b/README.md @@ -23,7 +23,7 @@ Please open an issue if you find something missing or not working as expected. | Linux | intel | 64 | glibc >= 2.28 (e.g., Ubuntu 18.04+, CentOS 6+, ...) | last: 2024.3.5 | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | Github Actions | | Linux | aarch64 | 64 | glibc >= 2.28 (e.g., Raspberry Pi, ...) | last: 2024.3.5 | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | Circle CI | | macOS | intel | 64 | >= macOS 10.13 | last: 2024.3.5 | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | Github Actions | -| macOS | armv8 | 64 | >= macOS 11, M1 hardware | last: 2024.3.5 | ✔️ | ✔️ | ✔️ | ✔️ | | Github Actions | +| macOS | armv8 | 64 | >= macOS 11, M1 hardware | last: 2024.3.5 | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | Github Actions | | Windows | intel | 64 | | last: 2024.3.5 | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | Github Actions | ## Installation diff --git a/pyproject.toml b/pyproject.toml index 0e6b610..dc87a3e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ requires = [ "wheel", "cmake == 3.31.1", "numpy", - "conan == 1.64.0", + "conan == 1.66.0", "ninja", "pybind11-stubgen", "Pillow", # required for building the stubs diff --git a/setup.py b/setup.py index e793064..9c60539 100644 --- a/setup.py +++ b/setup.py @@ -196,21 +196,8 @@ def replace_all(file, search_exp, replace_exp): 'find_package(Python3 COMPONENTS Interpreter Development NumPy REQUIRED)', 'find_package(Python3 COMPONENTS Interpreter Development NumPy)', ) - - - print("---- Conf vars", file=sys.stderr) - print(sysconfig.get_paths(), file=sys.stderr) - print(sysconfig.get_config_vars(), file=sys.stderr) - print("---- Conf vars", file=sys.stderr) - - - - print("---- Conf vars", file=sys.stderr) - print(sysconfig.get_paths(), file=sys.stderr) - print(sysconfig.get_config_vars(), file=sys.stderr) - print("---- Conf vars", file=sys.stderr) - + # Define CMake options options = [ @@ -294,6 +281,14 @@ def to_win_path(pt: Path): f"-DCMAKE_OSX_ARCHITECTURES=arm64", f"-DCMAKE_VERBOSE_MAKEFILE=ON" # Increase verbosity ] + # for python 3.13 macOS ARM64, 'CFLAGS', 'LDFLAGS', 'LDSHARED', 'BLDSHARED' contains '-arch x86_64' + # see https://github.com/rdkit/rdkit/blob/498f57a4eb99a67d842cbc3f89f94b302f398a11/CMakeLists.txt#L376C59-L376C95 + # remove "-arch x86_64" from PYTHON_LDSHARED + if "cp313" in os.environ["CIBW_BUILD"]: + old = '${Python3_EXECUTABLE} -c "import sysconfig; print(sysconfig.get_config_var(\'LDSHARED\').lstrip().split(\' \', 1)[1])"' + new = '${Python3_EXECUTABLE} -c "import sysconfig; print(sysconfig.get_config_var(\'LDSHARED\').lstrip().split(\' \', 1)[1].replace(\'-arch x86_64\', \'\'))"' + replace_all("CMakeLists.txt", old, new) + if "linux" in sys.platform: # Use ninja for linux builds @@ -310,7 +305,7 @@ def to_win_path(pt: Path): ] else: cmds = [ - f"cmake -S . -B build --debug-find-pkg=Python3 {' '.join(options)} ", + f"cmake -S . -B build -LAH --debug-find-pkg=Python3 {' '.join(options)} ", "cmake --build build --config Release", "cmake --install build", ] @@ -321,6 +316,13 @@ def to_win_path(pt: Path): path_site_packages = rdkit_install_path / "lib" / py_name / "site-packages" if sys.platform == "win32": path_site_packages = rdkit_install_path / "Lib" / "site-packages" + + + print("---- Conf vars", file=sys.stderr) + print(sysconfig.get_paths(), file=sys.stderr) + print(sysconfig.get_config_vars(), file=sys.stderr) + print("---- Conf vars", file=sys.stderr) + print("!!! --- CMAKE build command and variables for RDKit", file=sys.stderr) print(cmds, file=sys.stderr)