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

Improve packaging [PEP 517 + 621] #1670

Merged
merged 6 commits into from
Jun 29, 2022

Conversation

cdce8p
Copy link
Member

@cdce8p cdce8p commented Jun 27, 2022

Description

Similar to pylint-dev/pylint#7076

  • Use isolated build environments PEP 517 with python -m build instead of deprecated python setup.py sdist bdist_wheel
  • Move project metadata from setup.cfg to pyproject.toml PEP 621
  • Cleanup MANIFEST.in -> entries haven't been used.
  • Add README.rst to MANIFEST.in. Required to be able to build the wheel from sdist and still include the readme text in the project metadata.

Metadata diff

-Author: Python Code Quality Authority
-Author-email: code-quality@python.org
+Author-email: Python Code Quality Authority <code-quality@python.org>
...
-Home-page: https://github.com/PyCQA/astroid
+Project-URL: Source Code, https://github.com/PyCQA/astroid
...
+Project-URL: Docs, https://pylint.pycqa.org/projects/astroid/en/latest/
...
-Platform: UNKNOWN

Notes

  • README.rst should be included in sdist to build wheel successfully. Without MANIFEST.in, README.rst would be added automatically. Let's add it manually, just in case something else is added to MANIFEST.in later.
  • Platform isn't used currently / anymore
  • Home-page was defined with url. I've moved it to project.urls and renamed it to Source Code.
  • Added project.url for Docs

@cdce8p cdce8p added the Maintenance Discussion or action around maintaining astroid or the dev workflow label Jun 27, 2022
@cdce8p cdce8p force-pushed the improve-packaging branch 2 times, most recently from 1c3b3d5 to 79350ba Compare June 27, 2022 23:36
@coveralls
Copy link

coveralls commented Jun 28, 2022

Pull Request Test Coverage Report for Build 2579380559

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 92.339%

Totals Coverage Status
Change from base Build 2562030096: 0.0%
Covered Lines: 9426
Relevant Lines: 10208

💛 - Coveralls

Copy link
Member

@Pierre-Sassoulas Pierre-Sassoulas left a comment

Choose a reason for hiding this comment

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

Great !

"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
Copy link
Collaborator

Choose a reason for hiding this comment

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

Should we add 3.11 as well?

Copy link
Member

Choose a reason for hiding this comment

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

Hmm nice catch, I think we forgot to add it in #1584

Suggested change
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 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.

Should we add 3.11 as well?

We don't support all 3.11 features yet. Especially support for TryStar is still missing. Tracking issue #1516
I should probably continue the work on #1389 soon. With that TryStar should be fairly strait forward.

Copy link
Member

Choose a reason for hiding this comment

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

I think we should add the 3.11 metadata before supporting all 3.11 features, because we're supporting all the old features and if we don't do that, then there's no astroid at all for 3.11 which is a lot worse than having astroid without some 3.11 exclusive features.

Copy link
Member Author

Choose a reason for hiding this comment

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

I think we should add the 3.11 metadata before supporting all 3.11 features, because we're supporting all the old features and if we don't do that, then there's no astroid at all for 3.11 which is a lot worse than having astroid without some 3.11 exclusive features.

We don't block anyone from installing astroid with Python 3.11.
However, the way I understand the classifier is "All of the features (or at least the major ones) for version x.xx are supported." That's why I would recommend to wait a bit longer before adding it.

Copy link
Member

Choose a reason for hiding this comment

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

We don't block anyone from installing astroid with Python 3.11.

Hmm right, my bad, pip is using install_require not the metadata.

setup.cfg Show resolved Hide resolved
@cdce8p
Copy link
Member Author

cdce8p commented Jun 28, 2022

After the issue with dependabot in pylint, I've added back setup.py here. At least for now, it seems like it's still required.

@cdce8p cdce8p added this to the 2.12.0 milestone Jun 28, 2022
@DanielNoord DanielNoord merged commit 1c3c18f into pylint-dev:main Jun 29, 2022
@cdce8p cdce8p deleted the improve-packaging branch June 29, 2022 08:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Maintenance Discussion or action around maintaining astroid or the dev workflow
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants