Skip to content

Commit

Permalink
chore: refine pyproject (#17)
Browse files Browse the repository at this point in the history
- conform to formatted changes
- add more archs build compatibility
  • Loading branch information
msclock authored Dec 1, 2024
1 parent ecf0c57 commit 929c461
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 16 deletions.
20 changes: 12 additions & 8 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,7 @@ name = "ss_pybind11"
description = "A template of serious scaffold family based on pybind11."
readme = "README.md"
license = { text = "MIT" }
authors = [
{ email = "[email protected]", name = "msclock" },
]
authors = [{ email = "[email protected]", name = "msclock" }]
requires-python = ">=3.8"
classifiers = [
"Intended Audience :: Science/Research",
Expand Down Expand Up @@ -60,10 +58,10 @@ metadata.version.provider = "scikit_build_core.metadata.setuptools_scm"
sdist.include = ["src/ss_pybind11/_version.py"]
cmake.args = [
"-DBUILD_TESTING=OFF",
"-DCMAKE_BUILD_TYPE=ReWithDebInfo", # Required RelWithDebInfo or Release
"-DCMAKE_BUILD_TYPE=ReWithDebInfo",
"-DCMAKE_TOOLCHAIN_FILE=cmake/vcpkg/vcpkg.toolchain.cmake",
"-DVCPKG_OVERLAY_TRIPLETS=cmake/vcpkg/triplets",
"-DVCPKG_OVERLAY_PORTS=cmake/vcpkg/ports"
"-DVCPKG_OVERLAY_PORTS=cmake/vcpkg/ports",
]

[tool.setuptools_scm]
Expand All @@ -76,13 +74,19 @@ test-extras = ["test"]
test-skip = ["*-win_arm64", "*-macosx_universal2:arm64"]

[tool.cibuildwheel.linux]
before-build =[
before-build = [
'yum install zip -y || apk add zip || true',
'apt update && apt install zip -y || true',
'apt update && apt install zip pkg-config -y || true',
'pip install cmake ninja',
'cmake --version', 'git --version', 'ninja --version',
'cmake --version',
'git --version',
'ninja --version',
]

[[tool.cibuildwheel.overrides]]
select = "*linux_{aarch64,armv7l,ppc64le,s390x}"
environment = { VCPKG_FORCE_SYSTEM_BINARIES = "1" }

[tool.pytest.ini_options]
minversion = "6.0"
addopts = ["-ra", "--showlocals", "--strict-markers", "--strict-config"]
Expand Down
20 changes: 12 additions & 8 deletions template/pyproject.toml.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,7 @@ license = { text = "MPL-2.0" }
[%- elif copyright_license == "The Unlicense (Unlicense)" %]
license = { text = "Unlicense" }
[%- endif %]
authors = [
{ email = "{{ author_email }}", name = "{{ author_name }}" },
]
authors = [{ email = "{{ author_email }}", name = "{{ author_name }}" }]
requires-python = ">={{ min_py }}"
classifiers = [
[%- if development_status == "Planning" %]
Expand Down Expand Up @@ -113,10 +111,10 @@ metadata.version.provider = "scikit_build_core.metadata.setuptools_scm"
sdist.include = ["src/{{ module_name }}/_version.py"]
cmake.args = [
"-DBUILD_TESTING=OFF",
"-DCMAKE_BUILD_TYPE=ReWithDebInfo", # Required RelWithDebInfo or Release
"-DCMAKE_BUILD_TYPE=ReWithDebInfo",
"-DCMAKE_TOOLCHAIN_FILE=cmake/vcpkg/vcpkg.toolchain.cmake",
"-DVCPKG_OVERLAY_TRIPLETS=cmake/vcpkg/triplets",
"-DVCPKG_OVERLAY_PORTS=cmake/vcpkg/ports"
"-DVCPKG_OVERLAY_PORTS=cmake/vcpkg/ports",
]

[tool.setuptools_scm]
Expand All @@ -129,13 +127,19 @@ test-extras = ["test"]
test-skip = ["*-win_arm64", "*-macosx_universal2:arm64"]

[tool.cibuildwheel.linux]
before-build =[
before-build = [
'yum install zip -y || apk add zip || true',
'apt update && apt install zip -y || true',
'apt update && apt install zip pkg-config -y || true',
'pip install cmake ninja',
'cmake --version', 'git --version', 'ninja --version',
'cmake --version',
'git --version',
'ninja --version',
]

[[tool.cibuildwheel.overrides]]
select = "*linux_{aarch64,armv7l,ppc64le,s390x}"
environment = { VCPKG_FORCE_SYSTEM_BINARIES = "1" }

[tool.pytest.ini_options]
minversion = "6.0"
addopts = ["-ra", "--showlocals", "--strict-markers", "--strict-config"]
Expand Down

0 comments on commit 929c461

Please sign in to comment.