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

bpo-39541: Remove distutils bdist_wininst command #18329

Closed
wants to merge 3 commits into from
Closed

bpo-39541: Remove distutils bdist_wininst command #18329

wants to merge 3 commits into from

Conversation

vstinner
Copy link
Member

@vstinner vstinner commented Feb 3, 2020

Remove distutils bdist_wininst command, it was deprecated in Python
3.8: use bdist_wheel command instead.

https://bugs.python.org/issue39541

@vstinner
Copy link
Member Author

vstinner commented Feb 3, 2020

Oh, this change breaks setuptools:

(...)
File "/home/runner/work/cpython/cpython/Doc/venv/lib/python3.9/site-packages/setuptools/command/install_scripts.py", line 35, in run
  bw_cmd = self.get_finalized_command("bdist_wininst")
(...)
ModuleNotFoundError: No module named 'distutils.command.bdist_wininst'

@vstinner
Copy link
Member Author

vstinner commented Feb 3, 2020

Oh, this change breaks setuptools: (...)

I reported the issue to setuptools: pypa/setuptools#1985

@zooba
Copy link
Member

zooba commented Feb 4, 2020

@vstinner The easiest way is probably to replace it with the contents of https://github.com/python/cpython/blob/master/PC/layout/support/distutils.command.bdist_wininst.py (which is currently what I drop in for the distros that don't include this). It keeps setuptools happy right up to the point where you try and use the command, and then it fails nicely. We can also point to the discussions or at least the bugs about why we removed it.

Remove distutils bdist_wininst command, it was deprecated in Python
3.8: use bdist_wheel command instead.
@vstinner
Copy link
Member Author

vstinner commented Feb 5, 2020

@vstinner The easiest way is probably to replace it with the contents of https://github.com/python/cpython/blob/master/PC/layout/support/distutils.command.bdist_wininst.py (which is currently what I drop in for the distros that don't include this). It keeps setuptools happy right up to the point where you try and use the command, and then it fails nicely. We can also point to the discussions or at least the bugs about why we removed it.

Done. I tested manually that "make venv PYTHON=../python" works in the Doc/ directory. It fails without the Lib/distutils/command/bdist_wininst.py stub.

@vstinner
Copy link
Member Author

vstinner commented Feb 5, 2020

@zooba: Should we keep PC/layout/support/distutils.command.bdist_wininst.py and Tools/msi/distutils.command.bdist_wininst.py? I don't know how these files are used.

@vstinner
Copy link
Member Author

vstinner commented Mar 3, 2020

@pganssle: my setuptools fix has been merged into setuptools. Does it change something to do you decision on this PR? Should it go into Python 3.9 or not?

@vstinner
Copy link
Member Author

There is no clear consensus towards removing distutils bdist_wininst command. I close this PR for now, it's too late for Python 3.9 (feature freeze is coming soon). We can reconsider removing it once setuptools will be more ready for this removal.

@vstinner vstinner closed this Mar 25, 2020
@vstinner vstinner deleted the remove_bdist_wininst branch March 25, 2020 16:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants