-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enable binary wheels for all python versions and OS #30
Closed
Closed
Changes from 28 commits
Commits
Show all changes
29 commits
Select commit
Hold shift + click to select a range
c808baf
Enable pybind11 support via submodule
ianhbell 19da150
Fix setting of cmake standard
ianhbell daa6e63
Fix setting of compiler
ianhbell 18b6d30
Add missing override
ianhbell ece2b40
Don't call make directly
ianhbell cd39e43
And enable building of wheels
ianhbell 0eaf866
And run the build script
ianhbell cd48488
Run the script via cibuildwheel
ianhbell ef5f9e8
Jump all the way to scikit-build-core
ianhbell 70ce3bc
Pre build step no longer needed
ianhbell bbb7d75
And copy generated shared library
ianhbell 5081503
Fix the names to make python imports happier
ianhbell 72e9983
Fix names in imports
ianhbell 71e87c2
Need numpy to run tests
ianhbell 79d97d1
And scipy and thermopack
ianhbell aaba098
Pin versions for tests
ianhbell 9ee6a38
Build script no longer needed
ianhbell 98fbc32
windows too just for fun
ianhbell 5188248
Bump thermopack version, no windows
ianhbell b5eeb73
Disable the testing
ianhbell f263473
Bump to remove deprecated node versions
ianhbell 7da44bb
Not yet available
ianhbell f280599
Need unique names for uploads
ianhbell 1723083
Bump scikit-build-core
ianhbell cff9171
Fix sdist?
ianhbell 1973d47
And merge the build artifacts together
ianhbell 3cf3f76
The submodule no longer needed
ianhbell 4eed6c1
setup.py is also not needed
ianhbell 454c289
Cleanup how arch flags are set
ianhbell File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
name: cibuildwheel | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
build_wheels: | ||
name: Build wheels on ${{ matrix.os }} | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest, windows-latest, macOS-latest] | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: checkout submodules | ||
run: git submodule update --init --recursive | ||
|
||
# Used to host cibuildwheel | ||
- uses: actions/setup-python@v4 | ||
|
||
- name: Install cibuildwheel and other dependencies | ||
run: python -m pip install cibuildwheel==2.17.0 build wheel setuptools | ||
|
||
- name: Build sdist | ||
run: pipx run build --sdist --outdir wheelhouse | ||
if: runner.os == 'Windows' | ||
|
||
- name: Build wheels | ||
run: python -m cibuildwheel --output-dir wheelhouse | ||
# to supply options, put them in 'env', like: | ||
env: | ||
CIBW_ARCHS: auto64 | ||
CIBW_ARCHS_MACOS: "universal2" | ||
# CIBW_BEFORE_BUILD: bash cpp/build.sh | ||
CIBW_ENVIRONMENT_MACOS: MACOSX_DEPLOYMENT_TARGET=11.0 | ||
CIBW_ENVIRONMENT_LINUX: CXXFLAGS='-fconcepts' | ||
CIBW_BUILD_VERBOSITY_WINDOWS: 2 | ||
CIBW_SKIP: "*pypy* *pp* *cp36* *cp37* *musl*" | ||
|
||
- uses: actions/upload-artifact@v4 | ||
with: | ||
name: binary-${{ matrix.os }}-${{ matrix.version }} | ||
path: | | ||
./wheelhouse/*.whl | ||
./wheelhouse/*.tar.gz | ||
merge: | ||
runs-on: ubuntu-latest | ||
needs: build_wheels | ||
steps: | ||
- name: Merge Artifacts | ||
uses: actions/upload-artifact/merge@v4 | ||
with: | ||
name: artifact | ||
pattern: binary-* |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
cmake_minimum_required(VERSION 3.16) | ||
cmake_policy(VERSION 3.12) | ||
project(KineticGas LANGUAGES C CXX) | ||
|
||
SET(CMAKE_CXX_STANDARD 17) | ||
|
||
if(NOT MSVC) | ||
# set(CMAKE_CXX_COMPILER /usr/bin/g++) # Setting these can, on some systems, cause cmake to go into an infinite loop (see: build.sh to set the compiler) | ||
# set(CMAKE_C_COMPILER /usr/bin/gcc) # Setting these can, on some systems, cause cmake to go into an infinite loop (see: build.sh to set the compiler) | ||
if(APPLE) | ||
set(CMAKE_CXX_FLAGS "-Wall -Wextra -Wno-unknown-pragmas -Wno-sign-compare -pthread -arch arm64") | ||
else() | ||
set(CMAKE_CXX_FLAGS "-Wall -Wextra -Wno-unknown-pragmas -Wno-sign-compare -pthread") | ||
endif(APPLE) | ||
set(CMAKE_CXX_FLAGS_RELEASE "-O3 -Wno-unused-parameter") | ||
set(CMAKE_CXX_FLAGS_DEBUG "-g -O0 -DDEBUG -Wno-unused-parameter -Wno-unused-const-variable") | ||
endif(NOT MSVC) | ||
|
||
set(SOURCES cpp/KineticGas.cpp cpp/KineticGas_mthr.cpp cpp/Spherical.cpp cpp/MieKinGas.cpp | ||
cpp/Integration/Integration.cpp cpp/Factorial.cpp cpp/bindings.cpp) | ||
|
||
if (CMAKE_BUILD_TYPE MATCHES Release) | ||
project(pykingas) | ||
set(TARGET pykingas) | ||
else() | ||
project(pykingas_d) | ||
set(TARGET pykingas_d) | ||
endif() | ||
|
||
# Find the module development requirements (requires FindPython from 3.17 or | ||
# scikit-build-core's built-in backport) | ||
find_package(Python REQUIRED COMPONENTS Interpreter Development.Module) | ||
find_package(pybind11 CONFIG REQUIRED) | ||
|
||
# Add a library using FindPython's tooling (pybind11 also provides a helper like | ||
# this) | ||
python_add_library(${TARGET} MODULE ${SOURCES} WITH_SOABI) | ||
target_link_libraries(${TARGET} PRIVATE pybind11::headers) | ||
|
||
# The install directory is the output (wheel) directory | ||
install(TARGETS ${TARGET} DESTINATION pykingas) |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
[build-system] | ||
requires = ["scikit-build-core>=0.9.3", "pybind11"] | ||
build-backend = "scikit_build_core.build" | ||
|
||
|
||
[project] | ||
name = "pykingas" | ||
version = "2.0.0" | ||
description="Revised Enskog theory for Mie fluids, and other spherical potentials. Allows prediction of transport coefficients such as diffusion coefficients, viscosities, thermal diffusion coefficients and thermal conductivities. In dense, multicomponent gas mixtures and supercritical mixtures." | ||
readme = "README.md" | ||
authors = [ | ||
{ name = "Vegard Gjeldvik Jervell", email = "vegard.g.j@icloud.com" }, | ||
] | ||
requires-python = ">=3.7" | ||
classifiers = [ | ||
"Development Status :: 4 - Beta", | ||
"License :: OSI Approved :: MIT License", | ||
"Programming Language :: Python :: 3 :: Only", | ||
"Programming Language :: Python :: 3.7", | ||
"Programming Language :: Python :: 3.8", | ||
"Programming Language :: Python :: 3.9", | ||
"Programming Language :: Python :: 3.10", | ||
"Programming Language :: Python :: 3.11", | ||
"Programming Language :: Python :: 3.12", | ||
] | ||
|
||
[project.optional-dependencies] | ||
test = ["pytest"] | ||
|
||
|
||
[tool.scikit-build] | ||
wheel.expand-macos-universal-tags = true | ||
|
||
|
||
[tool.cibuildwheel] | ||
#test-command = "pytest {project}/tests" | ||
#test-requires = ["pytest", "numpy~=1.22", "scipy~=1.7", "thermopack~=2.2"] | ||
#test-extras = ["test"] | ||
#test-skip = ["*universal2:arm64"] | ||
build-verbosity = 1 |
This file was deleted.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ooops this should be fixed. The arch should not be specified this way. It should instead be something like: https://github.com/usnistgov/teqp/blob/201ceb7c59780bd93df484b90c2b2e986823116f/CMakeLists.txt#L2