FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Declare build deps in `pyproject.toml` by mkoeppe · Pull Request #108 · flintlib/python-flint · GitHub

Repository navigation

Declare build deps in pyproject.toml - #108

Merged
oscarbenjamin merged 1 commit into
flintlib:masterfrom
passagemath:pyproject_toml
Jan 25, 2024
Merged

oscarbenjamin merged 1 commit into
flintlib:masterfrom
passagemath:pyproject_toml

Conversation

mkoeppe commented Jan 25, 2024

Copy link
Copy Markdown
Contributor

No description provided.

mkoeppe added a commit to passagemath/downstream-pyodide that referenced this pull request Jan 25, 2024

Copy link
Copy Markdown
Collaborator

Thanks. I had been thinking about doing this for a while but I wasn't sure about all implications given that setup.py uses distutils rather than setuptools (for Python < 3.12). I guess it is fine to call the backend setuptools in any case.

This should fix pip install for the special case that compilers and flint are already installed but a python-flint wheel is not available and should mean that --no-build-isolation is not needed any more.

There is also discussion about pyproject.toml in gh-52. Another thing that would be good to move to pyproject.toml would be all the cibuildwheel config which is currently duplicated in CI config/scripts:

env:
CIBW_BUILD: cp39-* cp310-* cp311-* cp312-*
CIBW_SKIP: "*-win32 *-manylinux_i686 *-musllinux_*"
CIBW_MANYLINUX_X86_64_IMAGE: manylinux2014
CIBW_MANYLINUX_I686_IMAGE: manylinux2014
CIBW_BEFORE_ALL_LINUX: bin/cibw_before_all_linux.sh
CIBW_BEFORE_ALL_MACOS: bin/cibw_before_all_macosx_x86_64.sh
CIBW_BEFORE_ALL_WINDOWS: msys2 -c bin/cibw_before_all_windows.sh
CIBW_BEFORE_BUILD_WINDOWS: msys2 -c bin/cibw_before_build_windows.sh
CIBW_BEFORE_BUILD: pip install numpy setuptools cython delvewheel
CIBW_ENVIRONMENT: >
C_INCLUDE_PATH=$(pwd)/.local/include/
LIBRARY_PATH=$(pwd)/.local/lib/
LD_LIBRARY_PATH=$(pwd)/.local/lib:$LD_LIBRARY_PATH
PYTHON_FLINT_MINGW64=true
CIBW_REPAIR_WHEEL_COMMAND_WINDOWS: >-
bin\cibw_repair_wheel_command_windows.bat {dest_dir} {wheel}
CIBW_TEST_COMMAND: python -c "import flint; print(str(flint.fmpz(2)))"

python-flint/bin/cibw.sh

Lines 12 to 36 in e5da576

export CIBW_ENVIRONMENT='C_INCLUDE_PATH=$(pwd)/.local/include/ LIBRARY_PATH=$(pwd)/.local/lib/ LD_LIBRARY_PATH=$(pwd)/.local/lib:$LD_LIBRARY_PATH PYTHON_FLINT_MINGW64=true'
export CIBW_BUILD='cp39-* cp310-* cp311-* cp312-*'
# export CIBW_BUILD='cp311-*'
export CIBW_SKIP='*-win32 *-manylinux_i686 *-musllinux_*'
# export CIBW_ARCHS_MACOS="x86_64"
export CIBW_ARCHS_MACOS="arm64"
export CIBW_BEFORE_ALL_LINUX=bin/cibw_before_all_linux.sh
# export CIBW_BEFORE_ALL_MACOS=bin/cibw_before_all_macosx_x86_64.sh
export CIBW_BEFORE_ALL_MACOS=bin/cibw_before_all_macosx_arm64.sh
export CIBW_BEFORE_ALL_WINDOWS='C:\\msys64\\usr\\bin\\bash bin/cibw_before_all_windows.sh'
export CIBW_BEFORE_BUILD='pip install numpy cython delvewheel'
export CIBW_BEFORE_BUILD_WINDOWS='C:\\msys64\\usr\\bin\\bash bin/cibw_before_build_windows.sh'
export CIBW_REPAIR_WHEEL_COMMAND_WINDOWS='bin\cibw_repair_wheel_command_windows.bat {dest_dir} {wheel}'
# export CIBW_TEST_COMMAND="python -c 'import flint; print(str(flint.fmpz(2)))'"
export CIBW_TEST_COMMAND="python -m flint.test"
# cibuildwheel --platform linux
# cibuildwheel --platform windows
cibuildwheel --platform macos

oscarbenjamin merged commit ea65d5f into flintlib:master Jan 25, 2024

Copy link
Copy Markdown
Collaborator

Thanks Matthias

mkoeppe deleted the pyproject_toml branch January 25, 2024 18:26

mkoeppe commented Jan 25, 2024

Copy link
Copy Markdown
Contributor Author

--no-build-isolation is not needed any more

#111 updates the README accordingly

mkoeppe added a commit to passagemath/downstream-pyodide that referenced this pull request Jan 26, 2024
mkoeppe added a commit to passagemath/downstream-pyodide that referenced this pull request Jan 27, 2024
mkoeppe added a commit to passagemath/downstream-pyodide that referenced this pull request Jan 27, 2024
mkoeppe added a commit to passagemath/downstream-pyodide that referenced this pull request Jan 27, 2024
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants


Back | FazBrowse Home | New Git URL