Skip to content

bpo-43425: Update setup.py not to use distutils.log #26969

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 3 commits into from
Jul 2, 2021

Conversation

corona10
Copy link
Member

@corona10 corona10 commented Jun 30, 2021

@corona10
Copy link
Member Author

corona10 commented Jun 30, 2021

@vstinner

renaming build/scripts-3.11/idle3 to build/scripts-3.11/idle3.11 contains in names
Do you have any ideas? -> solved

@corona10 corona10 changed the title bpo-43425: Update setup.py not to use distutils.log [WIP] bpo-43425: Update setup.py not to use distutils.log Jul 1, 2021
@corona10 corona10 changed the title [WIP] bpo-43425: Update setup.py not to use distutils.log bpo-43425: Update setup.py not to use distutils.log Jul 1, 2021
@corona10 corona10 force-pushed the bpo-43425-setup branch 2 times, most recently from 1709cb3 to b1ea241 Compare July 1, 2021 02:53
@@ -2667,7 +2673,7 @@ def copy_scripts(self):
newfilename = filename + fullversion
else:
newfilename = filename + minoronly
log.info('renaming %s to %s', filename, newfilename)
log.info(f'renaming {filename} to {newfilename}')
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With your change, I no longer see this message. IMO you should mimick distutils setup() function which sets the logging thredshold to INFO:

  File "/home/vstinner/python/main/./setup.py", line 2698, in main
    setup(# PyPI Metadata (PEP 301)
  File "/home/vstinner/python/main/Lib/distutils/core.py", line 134, in setup
    ok = dist.parse_command_line()
  File "/home/vstinner/python/main/Lib/distutils/dist.py", line 477, in parse_command_line
    log.set_verbosity(self.verbose)
  File "/home/vstinner/python/main/Lib/distutils/log.py", line 78, in set_verbosity
    set_threshold(INFO)

To see the message on the main branch:

$ rm -rf build/scripts-3.11/
$ make
(...)
renaming build/scripts-3.11/pydoc3 to build/scripts-3.11/pydoc3.11
renaming build/scripts-3.11/idle3 to build/scripts-3.11/idle3.11
renaming build/scripts-3.11/2to3 to build/scripts-3.11/2to3-3.11

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank's nice catch :)

@corona10 corona10 changed the title bpo-43425: Update setup.py not to use distutils.log [WIP] bpo-43425: Update setup.py not to use distutils.log Jul 1, 2021
@corona10 corona10 changed the title [WIP] bpo-43425: Update setup.py not to use distutils.log bpo-43425: Update setup.py not to use distutils.log Jul 1, 2021
Copy link
Member

@vstinner vstinner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

Ok, this time I can ready "renaming ..." logs ;-)

@corona10 corona10 merged commit a7e251b into python:main Jul 2, 2021
@miss-islington
Copy link
Contributor

Thanks @corona10 for the PR 🌮🎉.. I'm working now to backport this PR to: 3.10.
🐍🍒⛏🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Jul 2, 2021
@bedevere-bot bedevere-bot removed the needs backport to 3.10 only security fixes label Jul 2, 2021
@bedevere-bot
Copy link

GH-26986 is a backport of this pull request to the 3.10 branch.

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.

6 participants