Skip to content
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

Use build to create wheels #2697

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 2 additions & 0 deletions packaging/python/build_requirements.txt
@@ -1,2 +1,4 @@
cython<3
packaging
build
setuptools_scm
26 changes: 24 additions & 2 deletions packaging/python/build_wheels.bash
Expand Up @@ -103,7 +103,18 @@ build_wheel_linux() {
# Workaround for https://github.com/pypa/manylinux/issues/1309
git config --global --add safe.directory "*"

python setup.py build_ext --cmake-prefix="/nrnwheel/ncurses;/nrnwheel/readline" --cmake-defs="$CMAKE_DEFS" $setup_args bdist_wheel
if [ -n "${setup_args}" ]; then
python -m build --wheel --no-isolation \
--config-setting="--global-option=build_ext" \
--config-setting="--global-option=${setup_args}" \
--config-setting="--global-option=--cmake-defs=${CMAKE_DEFS}" \
--config-setting='--global-option=--cmake-prefix="/nrnwheel/ncurses;/nrnwheel/readline"'
else
python -m build --wheel --no-isolation \
--config-setting="--global-option=build_ext" \
--config-setting="--global-option=--cmake-defs=${CMAKE_DEFS}" \
--config-setting='--global-option=--cmake-prefix="/nrnwheel/ncurses;/nrnwheel/readline"'
fi

# For CI runs we skip wheelhouse repairs
if [ "$SKIP_WHEELHOUSE_REPAIR" = true ] ; then
Expand Down Expand Up @@ -175,7 +186,18 @@ build_wheel_osx() {
fi
fi

python setup.py build_ext --cmake-prefix="/opt/nrnwheel/ncurses;/opt/nrnwheel/readline;/usr/x11" --cmake-defs="$CMAKE_DEFS" $setup_args bdist_wheel
if [ -n "${setup_args}" ]; then
python -m build --wheel --no-isolation \
--config-setting="--global-option=build_ext" \
--config-setting="--global-option=${setup_args}" \
--config-setting="--global-option=--cmake-defs=${CMAKE_DEFS}" \
--config-setting='--global-option=--cmake-prefix="/opt/nrnwheel/ncurses;/opt/nrnwheel/readline;/usr/x11"'
else
python -m build --wheel --no-isolation \
--config-setting="--global-option=build_ext" \
--config-setting="--global-option=--cmake-defs=${CMAKE_DEFS}" \
--config-setting='--global-option=--cmake-prefix="/opt/nrnwheel/ncurses;/opt/nrnwheel/readline;/usr/x11"'
fi

echo " - Calling delocate-listdeps"
delocate-listdeps dist/*.whl
Expand Down