Skip to content

Merge with distutils@85db7a41242#2902

Closed
jaraco wants to merge 11 commits into
mainfrom
feature/distutils-85db7a41242
Closed

Merge with distutils@85db7a41242#2902
jaraco wants to merge 11 commits into
mainfrom
feature/distutils-85db7a41242

Conversation

@jaraco

@jaraco jaraco commented Nov 22, 2021

Copy link
Copy Markdown
Member
  • Ensure run_setup handles if __name__ == '__main__'
  • Adopt setuptools.build_meta approach for run_setup
  • Separate run_commands from distutils.core.setup
  • Add test for run_commands
  • Ensure distribution object is returned
  • Use tokenize.open directly (available on Python>= 3.2)
  • Preserve orignal comment position
  • Remove early initialization of 'commands'; unneeded.

Summary of changes

Closes

Pull Request Checklist

abravalheri and others added 11 commits November 21, 2021 12:50
Adds a unit test for that scenario
`setuptools.build_meta` uses `tokenize.open` instead of open
(and replaces `\r\n` with `\n`) when exec-ing `setup.py` files.

It seems that the advantage of using `tokenize.open` is that it supports
automatic encoding detection.
This allows reusing the function for already made distribution objects.
Update `distutils.core.setup/run_setup` to better match `setuptools.build_meta`.
@jaraco jaraco force-pushed the feature/distutils-85db7a41242 branch from 786274c to 4bde5da Compare November 22, 2021 17:12
@jaraco

jaraco commented Nov 22, 2021

Copy link
Copy Markdown
Member Author

Merged manually to avoid double merge commit.

@jaraco jaraco closed this Nov 22, 2021
@jaraco jaraco deleted the feature/distutils-85db7a41242 branch November 22, 2021 18:07
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.

2 participants