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

Deprecation warning when building wheels on Python 3.12 and above #2696

Open
JCGoran opened this issue Jan 30, 2024 · 0 comments
Open

Deprecation warning when building wheels on Python 3.12 and above #2696

JCGoran opened this issue Jan 30, 2024 · 0 comments

Comments

@JCGoran
Copy link
Contributor

JCGoran commented Jan 30, 2024

On Python 3.12 and above we get the following deprecation warning when building the wheels:

/lib/python3.12/site-packages/setuptools/_distutils/cmd.py:66: SetuptoolsDeprecationWarning: setup.py install is deprecated.
!!

        ********************************************************************************
        Please avoid running ``setup.py`` directly.
        Instead, use pypa/build, pypa/installer or other
        standards-based tools.

        See https://blog.ganssle.io/articles/2021/10/setup-py-deprecated.html for details.
        ********************************************************************************

The calls are specifically here:

python setup.py build_ext --cmake-prefix="/nrnwheel/ncurses;/nrnwheel/readline" --cmake-defs="$CMAKE_DEFS" $setup_args bdist_wheel

python setup.py build_ext --cmake-prefix="/opt/nrnwheel/ncurses;/opt/nrnwheel/readline;/usr/x11" --cmake-defs="$CMAKE_DEFS" $setup_args bdist_wheel

For more information, see here.

Possibly related: #2228 (superset of this?)

JCGoran added a commit that referenced this issue Jan 30, 2024
In Python 3.12, calling `python setup.py` to create wheels is deprecated;
instead, one should use a "standard-based tool" (whatever that means),
like the `build` package from PyPA.
Therefore, instead of calling `setup.py bdist_wheel`, we use `python -m
build`, which is the recommended replacement for it (as mentioned here:
https://blog.ganssle.io/articles/2021/10/setup-py-deprecated.html#summary).
Fixes #2696.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant