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

Remove use of distutils #1632

Merged
merged 6 commits into from
Nov 5, 2021
Merged

Remove use of distutils #1632

merged 6 commits into from
Nov 5, 2021

Conversation

minrk
Copy link
Member

@minrk minrk commented Nov 5, 2021

closes #1620

Mostly easy. Two still-undocumented migrations, which ultimately amount to the same thing: use initialized state in base classes, rather than importing the pieces of the underlying implementation.

  1. use self.plat_name instead of util.get_platform(). I suspect this is just better, as in any rare cases where they disagreed, I think it should be more correct now
  2. pass around self.compiler instead of calling distutils.ccompiler.new_compiler. This is tricky to get access to, because we need to run build_ext.run() but that only configures a compiler if there's something to compile, so we have to:
    1. register an Extension that won't get compiled, so that compiler is created
    2. override build_extensions to not actually build extensions

- get_platform() -> cmd.plat_name
- distutils.version -> packaging.version
- distutils.sysconfig.get_config_var -> sysconfig.get_config_var
minrk added 5 commits November 5, 2021 12:52
isort --py 36 --tc -m 3 setup.py
instead of instantiating new ones with `distutils.ccompiler` which is deprecated with no replacement
when linking bundled libmzq on Windows, access the build dir directly
it doesn't work!
@minrk minrk merged commit 18268f8 into zeromq:main Nov 5, 2021
@minrk minrk deleted the undistutils branch November 5, 2021 12:52
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.

distutils has been deprecated in Python 3.10
1 participant