Skip to content

Commit c5d1285

Browse files
authored
Update to 2.9.1
Changes: - Update version from `2.8.1` to `2.9.1`. - Prefer ninja to NMake + make. - Enable author's tests, but do not act on results. - Disable win32 as it's a deprecated platform.
1 parent c920600 commit c5d1285

File tree

3 files changed

+79
-34
lines changed

3 files changed

+79
-34
lines changed

recipe/bld.bat

Lines changed: 33 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,41 @@
1-
REM Install headers with projectConfig.cmake files with cmake
2-
3-
mkdir build
4-
cd build
5-
cmake -G "NMake Makefiles" ^
6-
-D CMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^
7-
-D PYBIND11_TEST=OFF ^
8-
%SRC_DIR%
1+
:: cmd
2+
3+
:: Isolate the build.
4+
mkdir Build
5+
cd Build
96
if errorlevel 1 exit 1
107

11-
nmake
8+
9+
:: Generate the build files.
10+
cmake %SRC_DIR% -G"Ninja" %CMAKE_ARGS% ^
11+
-DCMAKE_PREFIX_PATH=%LIBRARY_PREFIX% ^
12+
-DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^
13+
-DPYBIND11_TEST=ON ^
14+
-DCMAKE_BUILD_TYPE=Release
15+
16+
17+
:: Build.
18+
ninja
1219
if errorlevel 1 exit 1
1320

14-
nmake install
21+
22+
:: Perforem tests.
23+
ninja check
24+
:: if errorlevel 1 exit 1
25+
26+
27+
:: Install.
28+
ninja install
1529
if errorlevel 1 exit 1
1630

17-
REM Install Python package
31+
32+
:: Install Python package
1833
set PYBIND11_USE_CMAKE=1
34+
set CMAKE_GENERATOR=Ninja
1935
cd %SRC_DIR%
20-
python %SRC_DIR%\setup.py install --single-version-externally-managed --record record.txt
36+
%PYTHON% %SRC_DIR%\setup.py install --single-version-externally-managed --record record.txt
37+
if errorlevel 1 exit 1
38+
39+
40+
:: Error free exit.
41+
exit 0

recipe/build.sh

Lines changed: 27 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,33 @@
1-
# Install headers with projectConfig.cmake files with cmake
2-
mkdir build
3-
cd build
1+
#!/bin/bash
42

5-
cmake \
6-
-DCMAKE_INSTALL_PREFIX=$PREFIX \
7-
-DPYTHON_EXECUTABLE=$PREFIX/bin/python \
8-
-DPYBIND11_TEST=OFF \
9-
$SRC_DIR
3+
# Isolate the build.
4+
mkdir -p Build
5+
cd Build || exit 1
6+
7+
8+
# Generate the build files.
9+
cmake ${SRC_DIR} -G"Ninja" ${CMAKE_ARGS} \
10+
-DCMAKE_PREFIX_PATH=$PREFIX \
11+
-DCMAKE_INSTALL_PREFIX=$PREFIX \
12+
-DPYTHON_EXECUTABLE=$PYTHON \
13+
-DPYBIND11_TEST=ON \
14+
-DCMAKE_BUILD_TYPE=Release
15+
16+
17+
# Build.
18+
ninja || exit 1
19+
20+
# Perform tests.
21+
#ninja check || exit 1
22+
ninja check || echo "======================= Testing Failed =============================" # Keep testing active for now and fix as time allows.
23+
24+
25+
# Install.
26+
ninja install || exit 1
1027

11-
make
12-
make install
1328

1429
# Install Python package
1530
export PYBIND11_USE_CMAKE=1
31+
export CMAKE_GENERATOR=Ninja
1632
cd $SRC_DIR
17-
python $SRC_DIR/setup.py install --single-version-externally-managed --record record.txt
33+
$PYTHON $SRC_DIR/setup.py install --single-version-externally-managed --record record.txt

recipe/meta.yaml

Lines changed: 19 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
{% set version = "2.8.1" %}
2-
{% set sha256 = "f1bcc07caa568eb312411dde5308b1e250bd0e1bc020fae855bf9f43209940cc" %}
1+
{% set version = "2.9.1" %}
2+
{% set sha256 = "c6160321dc98e6e1184cc791fbeadd2907bb4a0ce0e447f2ea4ff8ab56550913" %}
3+
{% set build_number = "0" %}
34

45
package:
56
name: pybind11
@@ -11,35 +12,42 @@ source:
1112
sha256: {{ sha256 }}
1213

1314
build:
14-
number: 0
15+
skip: true # [win32] win32 is a deprecated platform.
16+
number: {{ build_number }}
1517

1618
requirements:
1719
build:
18-
- cmake >=3.18
19-
- make # [unix]
2020
- {{ compiler('cxx') }}
21-
- patch # [not win]
22-
- m2-patch # [win]
21+
- cmake >=3.18
22+
- ninja
2323
host:
2424
- python
25-
- ninja
2625
- pip
2726
- setuptools >=42
2827
- wheel
28+
# The following packages are required/desireable for the author's testing:
29+
- pytest
30+
- numpy
31+
- scipy
32+
- eigen >=3.2.7 # [not s390x] Update when s390x has this package.
33+
- libboost >=1.56 # [not s390x] Update when s390x has this package.
2934
run:
3035
- python
3136

3237
test:
38+
# Note: The author's build tests are enabled in the build scripts;
39+
# however, they do not currently pass and the results of the check
40+
# are ignored. This should be corrected as time allows.
3341
imports:
3442
- pybind11
3543
requires:
3644
- pip
3745
commands:
3846
- test -f ${PREFIX}/share/cmake/pybind11/pybind11Config.cmake # [unix]
3947
- if exist %LIBRARY_PREFIX%\share\cmake\pybind11\pybind11Config.cmake (exit 0) else (exit 1) # [win]
40-
- test -f ${PREFIX}/include/pybind11/pybind11.h # [unix]
41-
- if exist %LIBRARY_INC%\pybind11\pybind11.h (exit 0) else (exit 1) # [win]
42-
- test -f $(python -c "import pybind11 as py; print(py.get_include())")/pybind11/pybind11.h # [unix]
48+
- test -f ${PREFIX}/include/pybind11/pybind11.h # [unix]
49+
- if exist %LIBRARY_INC%\pybind11\pybind11.h (exit 0) else (exit 1) # [win]
50+
- test -f $(python -c "import pybind11 as py; print(py.get_include())")/pybind11/pybind11.h # [unix]
4351
- if exist $(python -c "import pybind11 as py; print(py.get_include())")\pybind11\pybind11.h (exit 0) else (exit 1) # [win]
4452
- pip check
4553

0 commit comments

Comments
 (0)