Skip to content

Commit

Permalink
another way to cibuildwheel with specific python version
Browse files Browse the repository at this point in the history
  • Loading branch information
Routhleck committed Aug 25, 2024
1 parent 880357a commit 4796c6a
Show file tree
Hide file tree
Showing 11 changed files with 505 additions and 17 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ jobs:
python -m pip install --upgrade pip setuptools --no-cache-dir
python -m pip install -r requirements-dev.txt --no-cache-dir
pip install cibuildwheel
sh set_CIBW_BUILD.sh
sh copy_pyproject.sh
cibuildwheel --platform macos
pip install dist/*
- name: Test with pytest
Expand Down
16 changes: 8 additions & 8 deletions pyproject copy.toml → ci/mac/arm64/pyproject3.10.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,15 @@ requires = [
"pybind11",
"setuptools_scm[toml]>=3.4",
"cmake",
"taichi==1.7.2",
"taichi",
]

build-backend = "setuptools.build_meta"

[project]
requires-python = ">=3.8,<=3.12"
name = "brainpylib"
version = "0.3.2"
requires-python = "==3.10"
name = "braintaichi"
version = "0.0.1"

[tool.cibuildwheel.linux]
before-all = "sh prepare_build_wheel_on_cuda.sh"
Expand All @@ -48,23 +48,23 @@ before-build = "sh copy_so_linux.sh"
archs = ["x86_64"]
skip = ["pp*", "*-musllinux_x86_64"]
repair-wheel-command = """
export LD_LIBRARY_PATH=/project/brainpylib:$LD_LIBRARY_PATH &&
export LD_LIBRARY_PATH=/project/braintaichi:$LD_LIBRARY_PATH &&
auditwheel repair -w {dest_dir} {wheel}
"""

[tool.cibuildwheel.macos]
before-build = "sh copy_so_macOS.sh"
archs = ["x86_64", "arm64"]
archs = ["arm64"]
skip = ["pp*"]
repair-wheel-command = """
export LD_LIBRARY_PATH=/project/brainpylib:$LD_LIBRARY_PATH &&
export LD_LIBRARY_PATH=/project/braintaichi:$LD_LIBRARY_PATH &&
delocate-wheel -w {dest_dir} -v {wheel}
"""

[tool.cibuildwheel.windows]
before-build = "copy_dll_windows.bat"
archs = ["AMD64", "x86"]
repair-wheel-command = """
set PATH=brainpylib;%PATH% && delvewheel repair -w {dest_dir} {wheel}
set PATH=braintaichi;%PATH% && delvewheel repair -w {dest_dir} {wheel}
"""
skip = ["pp*", "*-win32"]
70 changes: 70 additions & 0 deletions ci/mac/arm64/pyproject3.11.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
[tool.cibuildwheel]
build = "*"
skip = ""
test-skip = ""

archs = ["auto"]
build-frontend = "pip"
config-settings = {}
dependency-versions = "pinned"
environment = {}
environment-pass = []
build-verbosity = 1

before-all = ""
repair-wheel-command = ""

test-command = ""
before-test = ""
test-requires = []
test-extras = []

container-engine = "docker"

manylinux-x86_64-image = "manylinux2014"

[build-system]
requires = [
"setuptools==68.2.0",
"wheel",
"Cython",
"pybind11",
"setuptools_scm[toml]>=3.4",
"cmake",
"taichi",
]

build-backend = "setuptools.build_meta"

[project]
requires-python = "==3.11"
name = "braintaichi"
version = "0.0.1"

[tool.cibuildwheel.linux]
before-all = "sh prepare_build_wheel_on_cuda.sh"
before-build = "sh copy_so_linux.sh"
#before-build = "pip install -r requirements-test.txt"
archs = ["x86_64"]
skip = ["pp*", "*-musllinux_x86_64"]
repair-wheel-command = """
export LD_LIBRARY_PATH=/project/braintaichi:$LD_LIBRARY_PATH &&
auditwheel repair -w {dest_dir} {wheel}
"""

[tool.cibuildwheel.macos]
before-build = "sh copy_so_macOS.sh"
archs = ["arm64"]
skip = ["pp*"]
repair-wheel-command = """
export LD_LIBRARY_PATH=/project/braintaichi:$LD_LIBRARY_PATH &&
delocate-wheel -w {dest_dir} -v {wheel}
"""

[tool.cibuildwheel.windows]
before-build = "copy_dll_windows.bat"
archs = ["AMD64", "x86"]
repair-wheel-command = """
set PATH=braintaichi;%PATH% && delvewheel repair -w {dest_dir} {wheel}
"""
skip = ["pp*", "*-win32"]
70 changes: 70 additions & 0 deletions ci/mac/arm64/pyproject3.12.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
[tool.cibuildwheel]
build = "*"
skip = ""
test-skip = ""

archs = ["auto"]
build-frontend = "pip"
config-settings = {}
dependency-versions = "pinned"
environment = {}
environment-pass = []
build-verbosity = 1

before-all = ""
repair-wheel-command = ""

test-command = ""
before-test = ""
test-requires = []
test-extras = []

container-engine = "docker"

manylinux-x86_64-image = "manylinux2014"

[build-system]
requires = [
"setuptools==68.2.0",
"wheel",
"Cython",
"pybind11",
"setuptools_scm[toml]>=3.4",
"cmake",
"taichi",
]

build-backend = "setuptools.build_meta"

[project]
requires-python = "==3.12"
name = "braintaichi"
version = "0.0.1"

[tool.cibuildwheel.linux]
before-all = "sh prepare_build_wheel_on_cuda.sh"
before-build = "sh copy_so_linux.sh"
#before-build = "pip install -r requirements-test.txt"
archs = ["x86_64"]
skip = ["pp*", "*-musllinux_x86_64"]
repair-wheel-command = """
export LD_LIBRARY_PATH=/project/braintaichi:$LD_LIBRARY_PATH &&
auditwheel repair -w {dest_dir} {wheel}
"""

[tool.cibuildwheel.macos]
before-build = "sh copy_so_macOS.sh"
archs = ["arm64"]
skip = ["pp*"]
repair-wheel-command = """
export LD_LIBRARY_PATH=/project/braintaichi:$LD_LIBRARY_PATH &&
delocate-wheel -w {dest_dir} -v {wheel}
"""

[tool.cibuildwheel.windows]
before-build = "copy_dll_windows.bat"
archs = ["AMD64", "x86"]
repair-wheel-command = """
set PATH=braintaichi;%PATH% && delvewheel repair -w {dest_dir} {wheel}
"""
skip = ["pp*", "*-win32"]
70 changes: 70 additions & 0 deletions ci/mac/arm64/pyproject3.9.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
[tool.cibuildwheel]
build = "*"
skip = ""
test-skip = ""

archs = ["auto"]
build-frontend = "pip"
config-settings = {}
dependency-versions = "pinned"
environment = {}
environment-pass = []
build-verbosity = 1

before-all = ""
repair-wheel-command = ""

test-command = ""
before-test = ""
test-requires = []
test-extras = []

container-engine = "docker"

manylinux-x86_64-image = "manylinux2014"

[build-system]
requires = [
"setuptools==68.2.0",
"wheel",
"Cython",
"pybind11",
"setuptools_scm[toml]>=3.4",
"cmake",
"taichi",
]

build-backend = "setuptools.build_meta"

[project]
requires-python = "==3.9"
name = "braintaichi"
version = "0.0.1"

[tool.cibuildwheel.linux]
before-all = "sh prepare_build_wheel_on_cuda.sh"
before-build = "sh copy_so_linux.sh"
#before-build = "pip install -r requirements-test.txt"
archs = ["x86_64"]
skip = ["pp*", "*-musllinux_x86_64"]
repair-wheel-command = """
export LD_LIBRARY_PATH=/project/braintaichi:$LD_LIBRARY_PATH &&
auditwheel repair -w {dest_dir} {wheel}
"""

[tool.cibuildwheel.macos]
before-build = "sh copy_so_macOS.sh"
archs = ["arm64"]
skip = ["pp*"]
repair-wheel-command = """
export LD_LIBRARY_PATH=/project/braintaichi:$LD_LIBRARY_PATH &&
delocate-wheel -w {dest_dir} -v {wheel}
"""

[tool.cibuildwheel.windows]
before-build = "copy_dll_windows.bat"
archs = ["AMD64", "x86"]
repair-wheel-command = """
set PATH=braintaichi;%PATH% && delvewheel repair -w {dest_dir} {wheel}
"""
skip = ["pp*", "*-win32"]
70 changes: 70 additions & 0 deletions ci/mac/x86_64/pyproject3.10.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
[tool.cibuildwheel]
build = "*"
skip = ""
test-skip = ""

archs = ["auto"]
build-frontend = "pip"
config-settings = {}
dependency-versions = "pinned"
environment = {}
environment-pass = []
build-verbosity = 1

before-all = ""
repair-wheel-command = ""

test-command = ""
before-test = ""
test-requires = []
test-extras = []

container-engine = "docker"

manylinux-x86_64-image = "manylinux2014"

[build-system]
requires = [
"setuptools==68.2.0",
"wheel",
"Cython",
"pybind11",
"setuptools_scm[toml]>=3.4",
"cmake",
"taichi",
]

build-backend = "setuptools.build_meta"

[project]
requires-python = "==3.10"
name = "braintaichi"
version = "0.0.1"

[tool.cibuildwheel.linux]
before-all = "sh prepare_build_wheel_on_cuda.sh"
before-build = "sh copy_so_linux.sh"
#before-build = "pip install -r requirements-test.txt"
archs = ["x86_64"]
skip = ["pp*", "*-musllinux_x86_64"]
repair-wheel-command = """
export LD_LIBRARY_PATH=/project/braintaichi:$LD_LIBRARY_PATH &&
auditwheel repair -w {dest_dir} {wheel}
"""

[tool.cibuildwheel.macos]
before-build = "sh copy_so_macOS.sh"
archs = ["x86_64"]
skip = ["pp*"]
repair-wheel-command = """
export LD_LIBRARY_PATH=/project/braintaichi:$LD_LIBRARY_PATH &&
delocate-wheel -w {dest_dir} -v {wheel}
"""

[tool.cibuildwheel.windows]
before-build = "copy_dll_windows.bat"
archs = ["AMD64", "x86"]
repair-wheel-command = """
set PATH=braintaichi;%PATH% && delvewheel repair -w {dest_dir} {wheel}
"""
skip = ["pp*", "*-win32"]
Loading

0 comments on commit 4796c6a

Please sign in to comment.