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

Customising build.sub_commands directly from distutils has been deprecated and is about to be removed #1014

Closed
abravalheri opened this issue Apr 22, 2024 · 3 comments · Fixed by #1015

Comments

@abravalheri
Copy link
Contributor

The following feature in setuptools has been deprecated for almost 2 years and is about to be removed:

https://github.com/pypa/setuptools/blob/1ed759173983656734c3606e9c97a348895e5e0c/setuptools/command/build.py#L13-L27

It might be a good idea to import build directly from setuptools for the following code:

bpython/setup.py

Lines 131 to 139 in ca13bf5

build.sub_commands.insert(0, ("compile_catalog", None))
cmdclass["compile_catalog"] = babel.compile_catalog
cmdclass["extract_messages"] = babel.extract_messages
cmdclass["update_catalog"] = babel.update_catalog
cmdclass["init_catalog"] = babel.init_catalog
if using_sphinx:
build.sub_commands.insert(0, ("build_sphinx_man", None))

(build is available directly from setuptools, starting on version v62.4.0)

@sebastinas
Copy link
Contributor

Maybe they could stop changing everything all the time.

@abravalheri
Copy link
Contributor Author

abravalheri commented Apr 24, 2024

Maybe they could stop changing everything all the time.

To minimise the impacts of the changes in setuptools, one possibility is to cap the version of setuptools in pyproject.toml... This way the project will not be affected.

@sebastinas
Copy link
Contributor

I am afraid this is only a temporary solution until distributions move to newer setuptools versions.

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.

2 participants