Skip to content

Use setuptools in setup.py for setup() function#224

Closed
jdufresne wants to merge 1 commit into
yaml:masterfrom
jdufresne:setuptools
Closed

Use setuptools in setup.py for setup() function#224
jdufresne wants to merge 1 commit into
yaml:masterfrom
jdufresne:setuptools

Conversation

@jdufresne
Copy link
Copy Markdown
Contributor

Uses the modern, recommended approach as documented at:

https://docs.python.org/3/library/distutils.html#module-distutils

Most Python users will not want to use this module directly, but
instead use the cross-version tools maintained by the Python Packaging
Authority. In particular, setuptools is an enhanced alternative to
distutils that provides: ...

Fixes warning: "Unknown distribution option: 'python_requires'" and more
importantly, the python_requires will now be honored as that is a
setuptools only feature.

Allows removing the bdist_wheel command as this is available by default.

Uses the modern, recommended approach as documented at:

https://docs.python.org/3/library/distutils.html#module-distutils

> Most Python users will not want to use this module directly, but
> instead use the cross-version tools maintained by the Python Packaging
> Authority. In particular, setuptools is an enhanced alternative to
> distutils that provides: ...

Fixes warning: "Unknown distribution option: 'python_requires'" and more
importantly, the python_requires will now be honored as that is a
setuptools only feature.

Allows removing the bdist_wheel command as this is available by default.
@bsolomon1124
Copy link
Copy Markdown
Contributor

Any reluctance on merging this? It's a pretty straightforward change.

@bsolomon1124
Copy link
Copy Markdown
Contributor

Note that this change still keeps the distutils.dist.Distribution subclass, which will warn about python_requires (addressed in #410).

@nitzmahone
Copy link
Copy Markdown
Member

I remember having some trouble doing exactly this a year or so ago, but I was never able to figure out what the actual problem was. It had something to do with the setuptools sys.modules hackery happening elsewhere in this project's setup.py. I have no opposition to requiring setuptools in general, though- it's 2020 after all ;)

@webknjaz
Copy link
Copy Markdown

webknjaz commented Jul 3, 2020

@nitzmahone so let's merge it then

@webknjaz
Copy link
Copy Markdown

webknjaz commented Jul 3, 2020

(Especially in the light of the recent changes: pypa/setuptools#2228 + pypa/setuptools#2230)

@nitzmahone
Copy link
Copy Markdown
Member

handled in #407

@nitzmahone nitzmahone closed this Jan 13, 2021
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.

5 participants