Skip to content

Update package build process and add 'build' to requirements #1524

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

Merged
merged 1 commit into from
Jun 25, 2025

Conversation

RensDimmendaal
Copy link
Contributor

Fixes the deprecation warning:

.../.venv/lib/python3.12/site-packages/setuptools/_distutils/cmd.py:90: 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.
        ********************************************************************************

!!

Changes

  • Replace python setup.py sdist bdist_wheel with python -m build in release_pypi function
  • Add build dependency to requirements

Background

As explained in https://blog.ganssle.io/articles/2021/10/setup-py-deprecated.html, direct setup.py invocations are deprecated because they cannot bootstrap their own dependencies and setuptools is moving away from providing CLI functionality. The modern approach uses python -m build which properly handles build-time dependencies in isolated environments.

@RensDimmendaal RensDimmendaal requested a review from jph00 June 24, 2025 07:31
@jph00
Copy link
Contributor

jph00 commented Jun 25, 2025

Great! :D

@jph00 jph00 merged commit dde07ab into main Jun 25, 2025
10 checks passed
@jph00 jph00 deleted the fix/nbdev_pypi-depr-warn branch June 25, 2025 21:41
@jph00 jph00 added the enhancement New feature or request label Jun 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants