diff --git a/.github/workflows/build-topics-test-gha-branch.yml b/.github/workflows/build-topics-test-gha-branch.yml index 100a5e0d..20ee21eb 100644 --- a/.github/workflows/build-topics-test-gha-branch.yml +++ b/.github/workflows/build-topics-test-gha-branch.yml @@ -30,7 +30,7 @@ jobs: - make-source-dist strategy: matrix: - python_version: ['3.8', '3.12'] + python_version: ['3.8'] steps: - name: Install Python uses: actions/setup-python@v5 @@ -38,6 +38,8 @@ jobs: python-version: ${{ matrix.python_version }} - name: Install Python packages run: pip${{ matrix.python_version }} install auditwheel build Chrones pybind11 twine + - run: python${{ matrix.python_version }} -m pybind11 --help + - run: python${{ matrix.python_version }} -m pybind11 --includes - name: Install CUDA run: | sudo apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/3bf863cc.pub @@ -108,7 +110,7 @@ jobs: - build-for-linux strategy: matrix: - python_version: ['3.8', '3.12'] + python_version: ['3.8'] steps: - name: Install Python uses: actions/setup-python@v5 @@ -195,7 +197,7 @@ jobs: - build-for-windows strategy: matrix: - python_version: ['3.8', '3.12'] + python_version: ['3.8'] env: MACOSX_DEPLOYMENT_TARGET: 11.0 steps: diff --git a/setup.py b/setup.py index 3f2da521..92f21b1f 100644 --- a/setup.py +++ b/setup.py @@ -225,14 +225,14 @@ def make_liblincs_extension(): print("WARNING: 'chrones' was not found, lincs will be compiled without Chrones", file=sys.stderr) try: - include_dirs += [ - option[2:] - for option in subprocess.run( - [sys.executable, "-m", "pybind11", "--includes"], capture_output=True, universal_newlines=True, check=True, - ).stdout.strip().split(" ") - ] + pybind1_command = [sys.executable, "-m", "pybind11", "--includes"] + pybind1_process = subprocess.run(pybind1_command, capture_output=True, universal_newlines=True, check=True) except subprocess.CalledProcessError: print("WARNING: 'pybind11' was not found, compilation will fail", file=sys.stderr) + print(pybind1_command, file=sys.stderr) + subprocess.run(pybind1_command) + else: + include_dirs += [option[2:] for option in pybind1_process.stdout.strip().split(" ")] if sys.platform == "linux": extra_compile_args["c++"] = ["-std=c++17", "-Werror=switch", "-fopenmp"]