Skip to content

Commit

Permalink
Merge pull request #108 from isuruf/rm-ver-specific
Browse files Browse the repository at this point in the history
remvoe python version specific headers and fix windows layout
  • Loading branch information
henryiii authored Oct 29, 2024
2 parents 61c738a + 3aa6800 commit 96fb40e
Show file tree
Hide file tree
Showing 8 changed files with 230 additions and 15 deletions.
37 changes: 37 additions & 0 deletions .azure-pipelines/azure-pipelines-win.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 16 additions & 0 deletions .ci_support/win_64_.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
c_stdlib:
- vs
channel_sources:
- conda-forge
channel_targets:
- conda-forge main
cxx_compiler:
- vs2019
pin_run_as_build:
python:
min_pin: x.x
max_pin: x.x
python:
- 3.13.* *_cp313
target_platform:
- win-64
14 changes: 7 additions & 7 deletions .scripts/build_steps.sh

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

152 changes: 152 additions & 0 deletions .scripts/run_win_build.bat

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion azure-pipelines.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion conda-forge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,7 @@ github:
provider:
linux_aarch64: default
linux_ppc64le: default
win: azure
test: native_and_emulated
noarch_platforms:
- linux_64
- win_64
1 change: 1 addition & 0 deletions recipe/build-pybind11-global.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
# https://github.com/conda/conda-build/blob/d75ef9c66dbcc832d8d96f33a2aecfe893266e8c/conda_build/build.py#L2517-L2527
export PYBIND11_GLOBAL_SDIST=1
$PYTHON -m pip install . -vv --no-build-isolation
rm -rf $PREFIX/include/python*/pybind11_global
18 changes: 12 additions & 6 deletions recipe/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ source:
sha256: {{ sha256 }}

build:
number: 1
number: 2
noarch: python

requirements:
Expand All @@ -29,12 +29,15 @@ outputs:
noarch: generic
run_exports:
- pybind11-abi =={{ abi_version }}
# This output is broken. Disabling for now
# See https://github.com/conda-forge/pybind11-feedstock/issues/96
skip: True
test:
source_files:
- include/pybind11/detail/internals.h
commands:
# make sure the internals version matches the package version
- if [ $(grep "#define PYBIND11_INTERNALS_VERSION" include/pybind11/detail/internals.h | cut -d' ' -f3) != "{{ abi_version }}" ]; then exit 1; fi
- if [ $(grep "#define PYBIND11_INTERNALS_VERSION" include/pybind11/detail/internals.h | cut -d' ' -f3) != "{{ abi_version }}" ]; then exit 1; fi # [unix]

- name: pybind11-global
script: build-pybind11-global.sh # [unix]
Expand All @@ -55,6 +58,9 @@ outputs:
- setuptools
run:
- python
# layouts are different on unix vs win
- __unix # [unix]
- __win # [win]
run_constrained:
- pybind11-abi =={{ abi_version }}
test:
Expand Down Expand Up @@ -82,19 +88,19 @@ outputs:
- setuptools
run:
- python
- {{ pin_subpackage("pybind11-global", exact=True) }}
- pybind11-global {{ PKG_VERSION }}=*_{{ PKG_BUILDNUM }}
run_constrained:
- pybind11-abi =={{ abi_version }}
test:
imports:
- pybind11
commands:
- test -f ${PREFIX}/share/cmake/pybind11/pybind11Config.cmake # [unix]
- if exist %LIBRARY_PREFIX%\share\cmake\pybind11\pybind11Config.cmake (exit 0) else (exit 1) # [win]
- if not exist %LIBRARY_PREFIX%\share\cmake\pybind11\pybind11Config.cmake exit 1 # [win]
- test -f ${PREFIX}/include/pybind11/pybind11.h # [unix]
- if exist %LIBRARY_INC%\pybind11\pybind11.h (exit 0) else (exit 1) # [win]
- if not exist %LIBRARY_INC%\pybind11\pybind11.h exit 1 # [win]
- test -f $(python -c "import pybind11 as py; print(py.get_include())")/pybind11/pybind11.h # [unix]
- if exist $(python -c "import pybind11 as py; print(py.get_include())")\pybind11\pybind11.h (exit 0) else (exit 1) # [win]
- if not exist %SP_DIR%\pybind11\include\pybind11\pybind11.h exit 1 # [win]

about:
home: https://github.com/pybind/pybind11/
Expand Down

0 comments on commit 96fb40e

Please sign in to comment.