Skip to content

Commit

Permalink
fix: window issue
Browse files Browse the repository at this point in the history
  • Loading branch information
henryiii committed Sep 18, 2020
1 parent da94ea1 commit c06d5e0
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 2 deletions.
5 changes: 4 additions & 1 deletion .github/workflows/wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ on:

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


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

- name: Show files
run: ls -lh wheelhouse
Expand Down
5 changes: 5 additions & 0 deletions conda.recipe/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ build:
- CC
- CXX
script: |
# This is a total hack because we are not using conda-forge pybind11. Remove after 2.6.0.
# And never do this yourself unless you know what you are doing (it
# explicitly is okay with pybind11, but may not be with arbitrary
# libraries)
{{ PYTHON }} -m pip install -vvv "git+https://github.com/pybind/pybind11.git@master"
{{ PYTHON }} -m pip install . -vvv --no-deps
{{ PYTHON }} -m pip uninstall -y pybind11
Expand All @@ -21,6 +25,7 @@ requirements:
build:
- {{ compiler('cxx') }}
- vs2017_{{ target_platform }} # [win]
# This is a hack because we are not using conda-forge pybind11. Remove after 2.6.0
- cmake

host:
Expand Down
5 changes: 4 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@

__version__ = "0.0.1"

# Windows strips quotes
wrap = r'\"{}\"' if sys.platform.startswith("win") else '"{}"'

# The main interface is through Pybind11Extension.
# * You can add cxx_std=11/14/17, and then build_ext can be removed.
# * You can set include_pybind11=false to add the include directory yourself,
Expand All @@ -26,7 +29,7 @@
Pybind11Extension("python_example",
["src/main.cpp"],
# Example: passing in the version to the compiled code
define_macros = [('VERSION_INFO', '"{}"'.format(__version__))],
define_macros = [('VERSION_INFO', wrap.format(__version__))],
),
]

Expand Down

0 comments on commit c06d5e0

Please sign in to comment.