Skip to content

Commit

Permalink
Fixing linux only wheel (#667)
Browse files Browse the repository at this point in the history
* Update build_wheels_and_publish.yml

* adding in python versions

* Update build_wheels_and_publish.yml

* Update meson.build

* Update meson.build

* Update pyproject.toml
  • Loading branch information
katiebreivik committed Aug 17, 2024
1 parent 4d326fa commit 16f6e63
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 7 deletions.
23 changes: 17 additions & 6 deletions .github/workflows/build_wheels_and_publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ env:
CIBW_MANYLINUX_X86_64_IMAGE: manylinux2014
CIBW_BEFORE_BUILD: pip install numpy --config-settings=setup-args="-Dallow-noblas=true"
CIBW_BUILD_VERBOSITY: "1"
CIBW_TEST_COMMAND: python src/cosmic/tests/test_evolve.py

jobs:
build-wheels-and-dist:
Expand All @@ -20,6 +21,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
python-version: [3.9, "3.10"]

steps:
- uses: actions/checkout@v3
Expand All @@ -38,16 +40,25 @@ jobs:
- name: Install numpy
run: |
python -m pip install --upgrade pip
python -m pip install numpy h5py versioneer
- name: Build source dist and wheels
python -m pip install numpy h5py versioneer
- name: Install dependencies
run: |
python -m pip install cibuildwheel setuptools wheel twine numpy build meson ninja
- name: Build source distribution (sdist)
run: |
python -m pip install setuptools wheel twine numpy build meson ninja
pip install .
python -m build
python -m build --sdist --outdir dist
- name: Build wheels using cibuildwheel
run: |
python -m build --outdir dist
unzip -l ./dist/*.whl
- uses: actions/upload-artifact@v3
with:
path: ./dist/*.tar.gz

- uses: actions/upload-artifact@v3
with:
path: ./dist/*.whl
Expand Down
2 changes: 1 addition & 1 deletion meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ f2py_source = custom_target(
'evolvebin-target',
input : ['src/cosmic/src/evolv2.f', 'src/cosmic/src/comprad.f'],
output : ['_evolvebinmodule.c', '_evolvebin-f2pywrappers.f'],
command : [py3, '-m', 'numpy.f2py', '@INPUT@', '-m', '_evolvebin', '--lower', '@OUTDIR']
command : [py3, '-m', 'numpy.f2py', '@INPUT@', '-m', '_evolvebin', '--lower', '@OUTDIR@']
)

lib_source = [
Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -44,3 +44,4 @@ build-backend = 'mesonpy'
# pyproject.toml
[tool.setuptools]
write_to = "src/cosmic/_version.py"
py-modules = ["_evolvebin"]

0 comments on commit 16f6e63

Please sign in to comment.