-
-
Notifications
You must be signed in to change notification settings - Fork 7
Packaging QuadDType #100
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
Open
SwayamInSync
wants to merge
185
commits into
numpy:main
Choose a base branch
from
SwayamInSync:quaddtype-packaging
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Packaging QuadDType #100
Changes from 184 commits
Commits
Show all changes
185 commits
Select commit
Hold shift + click to select a range
1575ac4
packaging quaddtype
SwayamInSync 00da2c7
fixing missing dependency
SwayamInSync 5333273
removing re-init of conda
SwayamInSync 2ad4b40
fixing wget issues and env issues
SwayamInSync 26f64ea
fixing PATH issues
SwayamInSync 028a62f
trying to resolve path intereference with cibuildwheel
SwayamInSync 5dcc19b
remoed CIBW_ENVIRONMENT
SwayamInSync 7487a39
reduced verbosity level and added CXXFLAG
SwayamInSync 5234cd2
fixing Py_NewRef error by switching to Py 3.10
SwayamInSync a582290
fixing manylinux issues
SwayamInSync 7e1028f
fixing toml multiline issue :)
SwayamInSync b00f74a
my bad conda typo
SwayamInSync 0644f28
still fixing multilinux issue
SwayamInSync 9288f5f
hmmm maybe can try switching to devtoolset-8
SwayamInSync 468e329
replacng problematic yum commands by standalone installation
SwayamInSync 8f3d623
switchg to curl
SwayamInSync 667aabc
using abs paths for linux paths
SwayamInSync 590b682
switching to auditool for linux
SwayamInSync 5258efa
fixing syntax issue
SwayamInSync 62be500
switching to manylinux_2_28_x86_64
SwayamInSync 12d5092
fixing testing environment issues
SwayamInSync 607ef05
commenting windows for now
SwayamInSync 3677bcc
removing windows
SwayamInSync 6b0d1f6
switching to macos-latest in workflow
SwayamInSync f105239
removing patchelf
SwayamInSync 20746a5
adding package-config file for sleef
SwayamInSync d475bee
sleef dep by pkg-config first
SwayamInSync 6fb2df3
fixing macos sleef not found
SwayamInSync 7962f5d
simplifying process and using pkg-config
SwayamInSync f6c6700
typo fix
SwayamInSync c98744b
trying some tweaks
SwayamInSync a1ccfc7
testing CI
SwayamInSync 59c3585
removed patchelf
SwayamInSync cb175bc
only macos
SwayamInSync 6f8e40c
adding support for macos-arm
SwayamInSync 75179ba
pushing fixes for Py3.13
SwayamInSync 6d958fc
supporting till 3.12
SwayamInSync 8e9f369
switching back to prev
SwayamInSync 3a3d38f
fixing x86 & arm for mac
SwayamInSync b054b45
fixing workflow
SwayamInSync ec2d2ec
fixing workflow
SwayamInSync 899f256
fixing workflow
SwayamInSync ca8eda0
fixing workflow
SwayamInSync 9a5ba62
fixing meson issues
SwayamInSync 62de91d
fixing branch in workflow
SwayamInSync c2a7595
installing wget for linux
SwayamInSync 543eaf7
simplifying to make it work
SwayamInSync d6a98db
fixing stupid typo
SwayamInSync e924a0a
testing linux
SwayamInSync 4cf263c
testing macos-13
SwayamInSync 2d78060
added MACOSX_DEPLOYMENT_TARGET=10.13
SwayamInSync 6961f5f
testing macos-14
SwayamInSync dabbc9e
testing linux one last time
SwayamInSync e780c2c
testing windows
SwayamInSync e098c42
switching to cmd
SwayamInSync ee7e804
trying again
SwayamInSync 26b46a9
going complete vanilla
SwayamInSync 9a2e6a6
using bitsadmin
SwayamInSync 071879a
installing powershell with winget
SwayamInSync 82021f8
pushing for linux, mac
SwayamInSync 3fe7899
win: switch to curl
SwayamInSync 29085b0
win: switch to curl
SwayamInSync 406bf50
win: switch to Python
SwayamInSync bb2f001
win: switch to powershell
SwayamInSync e01907a
win: switch to powershell
SwayamInSync 779736e
win: switch to pwsh
SwayamInSync 9a523a5
win: refacgor
SwayamInSync 4a3cfa6
win: refactor
SwayamInSync 5622a2a
win: refactor
SwayamInSync d2e9495
win: refactor
SwayamInSync 8ab8a0c
win: refactor
SwayamInSync 6199620
win: refactor
SwayamInSync d6c555f
win: refactor
SwayamInSync b3bbbc3
win: refactor
SwayamInSync ff1f28d
win: refactor
SwayamInSync 1e7cce5
win: refactor
SwayamInSync 9549817
win: refactor
SwayamInSync 3bbb0ae
win: refactor
SwayamInSync d2e19bb
win: refactor
SwayamInSync 0119906
win: refactor
SwayamInSync 36d4dab
fixing win
SwayamInSync 2729a2f
fixing win
SwayamInSync 9429ca8
fixing win
SwayamInSync 8261c63
fixing win
SwayamInSync 7405e4d
fixing win
SwayamInSync 72b597e
fixing win
SwayamInSync 0f58cea
fixing win
SwayamInSync cec6949
fixing win
SwayamInSync a8d2314
fixing win
SwayamInSync 30883aa
fixing win
SwayamInSync 3def6f9
fixing win
SwayamInSync 328cad6
fixing win
SwayamInSync 843f9c1
fixing win
SwayamInSync de462e3
ignoring win for now
SwayamInSync c00e50a
adding testpypi
SwayamInSync abd5826
fixed wheel location
SwayamInSync dd82dda
fixed wheel location
SwayamInSync b6dee9e
removed psi file as ignoring windows currently
SwayamInSync 7aff5f1
testing win
SwayamInSync 1cf9918
win: changed action
SwayamInSync 63a48de
edit win
SwayamInSync f64291c
meson edit
SwayamInSync 710ad26
meson edit
SwayamInSync 6c48ddc
refactoring linux and macos
SwayamInSync 2f47d2b
fixing python env
SwayamInSync 34cbc76
refactoring useless env
SwayamInSync 240fcb3
testing linux
SwayamInSync ddb5e0b
testing macos
SwayamInSync 8ede508
testing macos
SwayamInSync 9627822
testing macos
SwayamInSync a46a3d0
testing mac
SwayamInSync b551a27
testing mac
SwayamInSync 1f4f370
testing mac
SwayamInSync dff3ad6
testing mac
SwayamInSync 9546082
testing mac
SwayamInSync 23db450
testing mac
SwayamInSync cefde30
testing mac
SwayamInSync 87707c9
testing mac
SwayamInSync 4b71bc8
testing mac
SwayamInSync 3e0cd78
testing mac
SwayamInSync 4278843
testing mac
SwayamInSync b200adb
testing mac
SwayamInSync 3e0938e
testing mac
SwayamInSync 8d110df
testing mac
SwayamInSync b0753c5
testing mac
SwayamInSync eee4533
testing mac
SwayamInSync e57909e
testing mac
SwayamInSync 959c9be
testing mac
SwayamInSync 7a56e41
testing mac
SwayamInSync 2f0e02e
testing mac
SwayamInSync 59ac155
testing mac
SwayamInSync 5373d0b
testing mac
SwayamInSync 63fa579
testing mac
SwayamInSync 8b3192b
testing mac
SwayamInSync c75c11d
testing mac
SwayamInSync 43d664c
testing mac
SwayamInSync 90d9534
testing mac
SwayamInSync 5e59a0e
testing mac
SwayamInSync 659c2ad
testing mac
SwayamInSync 2375e0d
testing mac
SwayamInSync 7bdea6f
testing mac
SwayamInSync c473eb7
testing mac
SwayamInSync 0059e15
final test
SwayamInSync decab07
testing win
SwayamInSync 4ed0f2d
testing win
SwayamInSync b79048c
testing win
SwayamInSync ffdb44b
testing win
SwayamInSync 89e0f90
testing win
SwayamInSync 795938e
testing win
SwayamInSync 3c6bf2e
testing win
SwayamInSync 51d9eab
testing win
SwayamInSync 111a23a
testing win
SwayamInSync 10cb69e
testing win
SwayamInSync 257a6e5
testing win
SwayamInSync 38dfad8
testing win
SwayamInSync 9646bb8
testing win
SwayamInSync 8d1a44a
testing win
SwayamInSync 44781ae
testing win
SwayamInSync afff7cf
testing win
SwayamInSync d4e007e
testing win
SwayamInSync d5f5141
testing win
SwayamInSync 911085b
testing win
SwayamInSync 9abc75c
testing win
SwayamInSync d7c4b51
testing win
SwayamInSync 6ce30b8
testing win
SwayamInSync eda1a31
testing win
SwayamInSync f6c3706
testing win
SwayamInSync f85abd7
testing win
SwayamInSync 9a086e3
testing win
SwayamInSync 9de1629
testing win
SwayamInSync 4d3df6f
testing win
SwayamInSync 4f2db17
testing win
SwayamInSync 5b4fe75
testing win
SwayamInSync ca9f75a
final test
SwayamInSync bca4df3
Adding all the workflows in single file
SwayamInSync f29095e
fixing local CI
SwayamInSync b8132d2
fixing CI
SwayamInSync fe8b540
fixing CI
SwayamInSync e429a9b
merging CI fixes
SwayamInSync ac51015
setting trigger branch to main
SwayamInSync 1493a9b
Squashed commit of the following:
SwayamInSync cb77ce4
refactoring
SwayamInSync 770715b
Merge branch 'main' into quaddtype-packaging
SwayamInSync 99ed1f8
removed unnecessary env-var
SwayamInSync f9ced6e
win: replacing conda with manual sleef build
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 hidden or 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,249 @@ | ||
name: Build Wheels | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
tags: | ||
- "quaddtype-v*" | ||
paths: | ||
- "quaddtype/**" | ||
pull_request: | ||
paths: | ||
- "quaddtype/**" | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build_wheels_linux: | ||
name: Build wheels on Linux | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: ">=3.10.0" | ||
|
||
- name: Install cibuildwheel | ||
run: pip install cibuildwheel==2.20.0 | ||
|
||
- name: Build wheels | ||
env: | ||
CIBW_BUILD: "cp310-manylinux_x86_64 cp311-manylinux_x86_64 cp312-manylinux_x86_64" | ||
CIBW_MANYLINUX_X86_64_IMAGE: manylinux_2_28 | ||
CIBW_BUILD_VERBOSITY: "3" | ||
CIBW_BEFORE_ALL: | | ||
git clone https://github.com/shibatch/sleef.git | ||
cd sleef | ||
cmake -S . -B build -DSLEEF_BUILD_QUAD:BOOL=ON -DSLEEF_BUILD_SHARED_LIBS:BOOL=ON -DCMAKE_POSITION_INDEPENDENT_CODE=ON | ||
cmake --build build/ --clean-first -j | ||
cmake --install build --prefix /usr/local | ||
CIBW_ENVIRONMENT: > | ||
CFLAGS="-I/usr/local/include $CFLAGS" | ||
CXXFLAGS="-I/usr/local/include $CXXFLAGS" | ||
LDFLAGS="-L/usr/local/lib64 $LDFLAGS" | ||
LD_LIBRARY_PATH="/usr/local/lib64:$LD_LIBRARY_PATH" | ||
CIBW_REPAIR_WHEEL_COMMAND: | | ||
auditwheel repair -w {dest_dir} --plat manylinux_2_28_x86_64 {wheel} | ||
CIBW_TEST_COMMAND: | | ||
pip install {package}[test] | ||
pytest {project}/tests | ||
CIBW_TEST_EXTRAS: "test" | ||
run: | | ||
python -m cibuildwheel --output-dir wheelhouse | ||
working-directory: ./quaddtype | ||
|
||
- uses: actions/upload-artifact@v4 | ||
with: | ||
path: ./quaddtype/wheelhouse/*.whl | ||
name: wheels-linux | ||
|
||
build_wheels_macos: | ||
name: Build wheels on ${{ matrix.os }} | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: [macos-13, macos-14] | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: "3.10" | ||
|
||
- name: Install SLEEF | ||
env: | ||
MACOSX_DEPLOYMENT_TARGET: "11.0" | ||
run: | | ||
git clone https://github.com/shibatch/sleef.git | ||
cd sleef | ||
cmake -S . -B build \ | ||
-DSLEEF_BUILD_QUAD:BOOL=ON \ | ||
-DSLEEF_BUILD_SHARED_LIBS:BOOL=ON \ | ||
-DCMAKE_POSITION_INDEPENDENT_CODE=ON \ | ||
-DCMAKE_OSX_DEPLOYMENT_TARGET=11.0 \ | ||
-DCMAKE_INSTALL_RPATH="@loader_path/../lib" \ | ||
-DCMAKE_BUILD_WITH_INSTALL_RPATH=ON | ||
cmake --build build/ --clean-first -j | ||
sudo cmake --install build --prefix /usr/local | ||
- name: Install cibuildwheel | ||
run: pip install cibuildwheel==2.20.0 | ||
|
||
- name: Build wheels | ||
env: | ||
CIBW_BUILD: "cp310-* cp311-* cp312-*" | ||
CIBW_ARCHS_MACOS: ${{ matrix.os == 'macos-13' && 'x86_64' || 'arm64' }} | ||
CIBW_BUILD_VERBOSITY: "1" | ||
CIBW_ENVIRONMENT: > | ||
MACOSX_DEPLOYMENT_TARGET="11.0" | ||
DYLD_LIBRARY_PATH="/usr/local/lib:$DYLD_LIBRARY_PATH" | ||
CFLAGS="-I/usr/local/include $CFLAGS" | ||
CXXFLAGS="-I/usr/local/include $CXXFLAGS" | ||
LDFLAGS="-L/usr/local/lib $LDFLAGS" | ||
CIBW_REPAIR_WHEEL_COMMAND: > | ||
delocate-wheel --require-archs {delocate_archs} -w {dest_dir} -v {wheel} | ||
CIBW_TEST_COMMAND: | | ||
pip install {package}[test] | ||
pytest {project}/tests | ||
CIBW_TEST_EXTRAS: "test" | ||
run: | | ||
python -m cibuildwheel --output-dir wheelhouse | ||
working-directory: ./quaddtype | ||
|
||
- uses: actions/upload-artifact@v4 | ||
with: | ||
path: ./quaddtype/wheelhouse/*.whl | ||
name: wheels-${{ matrix.os }} | ||
|
||
build_wheels_windows: | ||
name: Build wheels on Windows | ||
runs-on: windows-latest | ||
strategy: | ||
matrix: | ||
architecture: [x64] | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Setup MSVC | ||
uses: ilammy/msvc-dev-cmd@v1 | ||
with: | ||
arch: ${{ matrix.architecture }} | ||
|
||
- name: Set up Python 3.10 | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: "3.10" | ||
architecture: ${{ matrix.architecture }} | ||
|
||
- name: Install Miniconda | ||
uses: conda-incubator/setup-miniconda@v3 | ||
with: | ||
auto-update-conda: true | ||
python-version: "3.10" | ||
architecture: ${{ matrix.architecture }} | ||
|
||
- name: Install SLEEF and other dependencies | ||
shell: bash -l {0} | ||
run: | | ||
conda config --add channels conda-forge | ||
conda config --set channel_priority strict | ||
conda install -y sleef numpy | ||
|
||
- name: Setup build environment | ||
shell: pwsh | ||
run: | | ||
$env:INCLUDE += ";$env:CONDA_PREFIX\Library\include" | ||
$env:LIB += ";$env:CONDA_PREFIX\Library\lib" | ||
$env:PATH = "$env:CONDA_PREFIX\Library\bin;$env:PATH" | ||
echo "INCLUDE=$env:INCLUDE" >> $env:GITHUB_ENV | ||
echo "LIB=$env:LIB" >> $env:GITHUB_ENV | ||
echo "PATH=$env:PATH" >> $env:GITHUB_ENV | ||
|
||
- name: Install build dependencies | ||
shell: bash -l {0} | ||
run: | | ||
pip install -U pip | ||
pip install cibuildwheel==2.20.0 ninja meson meson-python numpy delvewheel pytest | ||
|
||
- name: Build wheels | ||
env: | ||
CIBW_BUILD: "cp310-* cp311-* cp312-*" | ||
CIBW_SKIP: "pp* cp36-* cp37-* cp38-* cp39-* cp313-*" | ||
CIBW_ARCHS_WINDOWS: ${{ matrix.architecture == 'x86' && 'x86' || 'AMD64' }} | ||
CIBW_BUILD_VERBOSITY: "3" | ||
DISTUTILS_USE_SDK: "1" | ||
MSSdk: "1" | ||
CIBW_BEFORE_BUILD: | | ||
pip install meson meson-python ninja numpy | ||
CIBW_REPAIR_WHEEL_COMMAND: "delvewheel repair -w {dest_dir} {wheel}" | ||
CIBW_TEST_COMMAND: | | ||
pip install {package}[test] | ||
python -m pytest -v {project}/test | ||
CIBW_TEST_EXTRAS: test | ||
CIBW_TEST_FAIL_FAST: 1 | ||
shell: pwsh | ||
run: | | ||
python -m cibuildwheel --output-dir wheelhouse | ||
if (-not (Test-Path wheelhouse/*.whl)) { throw "Wheel was not created" } | ||
working-directory: ./quaddtype | ||
|
||
- uses: actions/upload-artifact@v4 | ||
with: | ||
path: ./quaddtype/wheelhouse/*.whl | ||
name: wheels-windows-${{ matrix.architecture }} | ||
|
||
publish_to_testpypi: | ||
name: Publish to TestPyPI | ||
needs: [build_wheels_linux, build_wheels_macos, build_wheels_windows] | ||
runs-on: ubuntu-latest | ||
if: startsWith(github.ref, 'refs/tags/quaddtype-v') | ||
steps: | ||
- name: Download all workflow run artifacts | ||
uses: actions/download-artifact@v4 | ||
with: | ||
path: dist | ||
- name: Publish to TestPyPI | ||
uses: pypa/[email protected] | ||
with: | ||
user: __token__ | ||
password: ${{ secrets.PYPI_API_TOKEN }} | ||
repository-url: https://test.pypi.org/legacy/ | ||
packages-dir: dist/* | ||
|
||
create_release: | ||
name: Create Release | ||
needs: [build_wheels_linux, build_wheels_macos, build_wheels_windows] | ||
runs-on: ubuntu-latest | ||
if: startsWith(github.ref, 'refs/tags/quaddtype-v') | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Download all workflow run artifacts | ||
uses: actions/download-artifact@v4 | ||
with: | ||
path: artifacts | ||
|
||
- name: Create Release | ||
id: create_release | ||
uses: actions/create-release@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }} | ||
with: | ||
tag_name: ${{ github.ref }} | ||
release_name: Release ${{ github.ref }} | ||
draft: false | ||
prerelease: false | ||
|
||
- name: Upload Release Assets | ||
uses: softprops/action-gh-release@v1 | ||
if: startsWith(github.ref, 'refs/tags/') | ||
with: | ||
files: ./artifacts/**/*.whl | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }} |
This file contains hidden or 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 |
---|---|---|
|
@@ -133,4 +133,5 @@ compile_commands.json | |
|
||
.ruff-cache/ | ||
.asv | ||
.vscode/ | ||
.vscode/ | ||
*.whl |
This file contains hidden or 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 hidden or 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 |
---|---|---|
|
@@ -2,7 +2,6 @@ | |
requires = [ | ||
"meson>=1.3.2", | ||
"meson-python", | ||
"patchelf", | ||
"wheel", | ||
"numpy" | ||
] | ||
|
@@ -13,8 +12,8 @@ name = "numpy_quaddtype" | |
description = "Quad (128-bit) float dtype for numpy" | ||
version = "0.0.1" | ||
readme = 'README.md' | ||
author = "Swayam Singh" | ||
requires-python = ">=3.9.0" | ||
authors = [{name = "Swayam Singh", email = "[email protected]"}] | ||
requires-python = ">=3.10.0" | ||
dependencies = [ | ||
"numpy" | ||
] | ||
|
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.
@mattip when you have time, can you coordinate with Swayam to add the configuration necessary to upload to pypi at https://pypi.org/project/numpy_quaddtype/? I think these are the relevant docs.
@SwayamInSync you should also probably manually upload a numpy_quaddtype release to pypi with a tarball containingnthe current state of the main branch. Mostly just to claim the name, but I think the project may have to exist already on pypi before you can set up trusted publishing.