Skip to content

Commit

Permalink
Looks like wrong syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
achaikou committed Oct 27, 2023
1 parent 2027d7d commit 30a6647
Showing 1 changed file with 61 additions and 63 deletions.
124 changes: 61 additions & 63 deletions python/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,67 @@ before-all = [
""",
]

before-build = [
"""cmake \
-S . \
-B build \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_POSITION_INDEPENDENT_CODE=ON \
-DBUILD_TESTING=OFF \
-DBUILD_PYTHON=OFF \
""",
"""cmake \
--build build \
--parallel \
--target install \
--config Release \
""",
]

test-requires = "pytest"

# Cibuildwheel doesn't run tests from the project directory. This is to ensure
# the wheel is imported by the tests, and not the source copy. Normally, one
# would run pytest using the cibw project variable like so: 'pytest
# {project}/tests'. This doesn't work for us however, because our tests use
# relative paths to our test data folder python/data. The workaround is to copy
# out the tests/ and data/ directories to the current folder. This has to be
# done in 'test-command' and not in 'before-test' because there is no guarantee
# they are run from the same directory.
test-command = [
"""python {project}/.github/utils.py copy --src {package}/tests --dst testdir/tests""",
"""python {project}/.github/utils.py copy --src {package}/data --dst testdir/data""",
"""cd testdir""",
"""pytest tests""",
"""python {project}/.github/utils.py remove --paths tests data""",
]

[tool.cibuildwheel.linux]
manylinux-x86_64-image = "manylinux2014"

[[tool.cibuildwheel.overrides]]
select = "cp3{9,10,11,12}*i686"
before-build= [
"python -m pip install numpy --config-settings=setup-args=\"-Dallow-noblas=true\" ",
"""cmake \
-S . \
-B build \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_POSITION_INDEPENDENT_CODE=ON \
-DBUILD_TESTING=OFF \
-DBUILD_PYTHON=OFF \
""",
"""cmake \
--build build \
--parallel \
--target install \
--config Release \
""",
]

[tool.cibuildwheel.macos]
environment = { CXXFLAGS="-L/usr/local/lib" }

before-all = [
"""curl \
-L https://github.com/fmtlib/fmt/archive/refs/tags/7.1.3.tar.gz \
Expand Down Expand Up @@ -86,7 +146,7 @@ before-all = [
--config Release \
""",
"""curl \
-L https://github.com/mpark/variant/archive/refs/tags/v1.4.0.tar.gz \
-L https://github.com/mpark/variant/archive/refs/tags/v1.4.0.tar.gz \
-o variant-1.4.0.tar.gz \
""",
"tar xf variant-1.4.0.tar.gz",
Expand All @@ -101,24 +161,6 @@ before-all = [
""",
]

before-build = [
"""cmake \
-S . \
-B build \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_POSITION_INDEPENDENT_CODE=ON \
-DBUILD_TESTING=OFF \
-DBUILD_PYTHON=OFF \
""",
"""cmake \
--build build \
--parallel \
--target install \
--config Release \
""",
]

[tool.cibuildwheel.macos]
before-build = [
"""cmake \
-S . \
Expand All @@ -135,47 +177,3 @@ before-build = [
--config Release \
""",
]

test-requires = "pytest"

# Cibuildwheel doesn't run tests from the project directory. This is to ensure
# the wheel is imported by the tests, and not the source copy. Normally, one
# would run pytest using the cibw project variable like so: 'pytest
# {project}/tests'. This doesn't work for us however, because our tests use
# relative paths to our test data folder python/data. The workaround is to copy
# out the tests/ and data/ directories to the current folder. This has to be
# done in 'test-command' and not in 'before-test' because there is no guarantee
# they are run from the same directory.
test-command = [
"""python {project}/.github/utils.py copy --src {package}/tests --dst testdir/tests""",
"""python {project}/.github/utils.py copy --src {package}/data --dst testdir/data""",
"""cd testdir""",
"""pytest tests""",
"""python {project}/.github/utils.py remove --paths tests data""",
]

[tool.cibuildwheel.linux]
manylinux-x86_64-image = "manylinux2014"

[[tool.cibuildwheel.overrides]]
select = "cp3{9,10,11,12}*i686"
before-build= [
"python -m pip install numpy --config-settings=setup-args=\"-Dallow-noblas=true\" ",
"""cmake \
-S . \
-B build \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_POSITION_INDEPENDENT_CODE=ON \
-DBUILD_TESTING=OFF \
-DBUILD_PYTHON=OFF \
""",
"""cmake \
--build build \
--parallel \
--target install \
--config Release \
""",
]

[tool.cibuildwheel.macos]
environment = { CXXFLAGS="-L/usr/local/lib" }

0 comments on commit 30a6647

Please sign in to comment.