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

Migrate metadata from setup.py to setup.cfg #863

Closed
wants to merge 6 commits into from

Conversation

cclauss
Copy link
Contributor

@cclauss cclauss commented Sep 2, 2023

Closes #862

Created using https://pypi.org/project/setuptools-py2cfg plus manual modifications.

https://setuptools.pypa.io/en/latest/userguide/quickstart.html#basic-use

We recommend users expose as much as possible configuration in a more declarative way via the pyproject.toml or setup.cfg, and keep the setup.py minimal with only the dynamic parts (or even omit it completely if applicable).


After this pull request is tested and merged, I can do a follow-up PR like...

PEP 621: Migrate settings from setup.cfg into pyproject.toml

Migrate settings from setup.cfg into pyproject.toml using ini2toml to do the file conversion and running pyproject-fmt and then validate-pyproject in pre-commit to validate the results.

name = oauthlib
version = attr: oauthlib.__version__
author = The OAuthlib Community
author_email = idan@gazit.me
Copy link
Contributor

Choose a reason for hiding this comment

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

we can use the email of two current active maintainer here

Copy link
Contributor Author

@cclauss cclauss Sep 3, 2023

Choose a reason for hiding this comment

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

@JonathanHuot Your call on changing the Author email address?

setup.cfg Outdated
license_files = LICENSE
long_description = file: README.rst
long_description_content_type = text/x-rst
maintainer = Ib Lundgren
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
maintainer = Ib Lundgren
maintainer = Asif Saif Uddin, Jonathan Huot

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@JonathanHuot Do you want your email address published as a Maintainer?

run: python setup.py sdist bdist_wheel
run: pip install build wheel
- name: Build Python package
run: python -m build
Copy link
Contributor

Choose a reason for hiding this comment

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

do this provide both sdist bdist_wheel at once?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Contributor

Choose a reason for hiding this comment

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

i saw that before, but just asking out of curiosity, do that provide same functionalities in a simpler new way?

Copy link
Contributor Author

@cclauss cclauss Sep 3, 2023

Choose a reason for hiding this comment

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

build is the PyPA default tool for doing Python builds without a setup.py but there are many other ways to do builds. I suggest we look at the build results to see if they fit our purposes.

setup.cfg Outdated
long_description = file: README.rst
long_description_content_type = text/x-rst
maintainer = Asif Saif Uddin, Jonathan Huot
maintainer_email = ib.lundgren@gmail.com
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
maintainer_email = ib.lundgren@gmail.com
maintainer_email = auvipy@gmail.com

@cclauss cclauss requested a review from auvipy September 3, 2023 16:25
@cclauss cclauss closed this Jan 6, 2024
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.

Adopt build because running setup.py is deprecated for security reasons
2 participants