Skip to content

Commit c06d5e0

Browse files
committed
fix: window issue
1 parent da94ea1 commit c06d5e0

File tree

3 files changed

+13
-2
lines changed

3 files changed

+13
-2
lines changed

.github/workflows/wheels.yml

+4-1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ on:
1212

1313
env:
1414
CIBW_TEST_COMMAND: python {project}/tests/test.py
15+
# This is a hack that can be removed when we start using wheels for pybind11
1516
CIBW_BEFORE_BUILD: pip install cmake git+https://github.com/pybind/pybind11.git@master
1617

1718

@@ -56,7 +57,9 @@ jobs:
5657
- name: Build wheel
5758
run: python -m cibuildwheel --output-dir wheelhouse
5859
env:
59-
CIBW_SKIP: cp27-win*
60+
# We have to skip Win 3.5 for now, because it doesn't support PEP 518
61+
# build from a portable install (can re-add when using wheels for pybind11)
62+
CIBW_SKIP: cp27-win* cp35-win*
6063

6164
- name: Show files
6265
run: ls -lh wheelhouse

conda.recipe/meta.yaml

+5
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@ build:
1313
- CC
1414
- CXX
1515
script: |
16+
# This is a total hack because we are not using conda-forge pybind11. Remove after 2.6.0.
17+
# And never do this yourself unless you know what you are doing (it
18+
# explicitly is okay with pybind11, but may not be with arbitrary
19+
# libraries)
1620
{{ PYTHON }} -m pip install -vvv "git+https://github.com/pybind/pybind11.git@master"
1721
{{ PYTHON }} -m pip install . -vvv --no-deps
1822
{{ PYTHON }} -m pip uninstall -y pybind11
@@ -21,6 +25,7 @@ requirements:
2125
build:
2226
- {{ compiler('cxx') }}
2327
- vs2017_{{ target_platform }} # [win]
28+
# This is a hack because we are not using conda-forge pybind11. Remove after 2.6.0
2429
- cmake
2530

2631
host:

setup.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@
1313

1414
__version__ = "0.0.1"
1515

16+
# Windows strips quotes
17+
wrap = r'\"{}\"' if sys.platform.startswith("win") else '"{}"'
18+
1619
# The main interface is through Pybind11Extension.
1720
# * You can add cxx_std=11/14/17, and then build_ext can be removed.
1821
# * You can set include_pybind11=false to add the include directory yourself,
@@ -26,7 +29,7 @@
2629
Pybind11Extension("python_example",
2730
["src/main.cpp"],
2831
# Example: passing in the version to the compiled code
29-
define_macros = [('VERSION_INFO', '"{}"'.format(__version__))],
32+
define_macros = [('VERSION_INFO', wrap.format(__version__))],
3033
),
3134
]
3235

0 commit comments

Comments
 (0)