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

PR: Upgrade packaging to avoid legacy/deprecated behavior and follow PEP 517 #272

Merged
merged 5 commits into from
Nov 22, 2021

Conversation

CAM-Gerlach
Copy link
Member

@CAM-Gerlach CAM-Gerlach commented Nov 1, 2021

Currently, the package is using the deprecated legacy builder and calling setup.py directly, which is causing warnings and will eventually go away completely. This migrates it to the (more) modern PEP 517 setuptools builder and setup.cfg, with a setup setup.py for backward compatibility. This also makes one change to how the version is handled to avoid having to import the package or execute any dynamic code to get the version statically, which shouldn't affect anything else as _version is marked as internal use only (with leading _). I've compared the wheels and sdists and, aside from the minor updates to the metadata made in a separate commit, they are byte for byte identical.

  • Update packaging for initial compatibility with PEP 517 and PEP 518
    • Add pyproject.toml
    • Update CIs
    • Update RELEASE.md accordingly
  • Use modern declarative setup.cfg instead of legacy dynamically-executed setup.py
    • Migrate setup.py metadata to setup.cfg
    • Fix/avoid encoding issues on open()
    • Run setup-cfg-format
    • Add stub setup.py for backward compat with legacy tools
    • More reliable static version handling
    • Update RELEASE,md accordingly
  • Add a few new bits of setup.cfg metadata
    • Add additional appropriate Trove tags
    • Add project urls
    • Add test extra
  • Update RELEASE,md to follow modern PEP 517/518 best practices

Resolve #270

@CAM-Gerlach CAM-Gerlach self-assigned this Nov 1, 2021
@CAM-Gerlach CAM-Gerlach added this to the v2.0.0 milestone Nov 1, 2021
@CAM-Gerlach CAM-Gerlach force-pushed the upgrade-packaging branch 3 times, most recently from 02eb05f to 091e53e Compare November 2, 2021 03:05
@CAM-Gerlach CAM-Gerlach marked this pull request as ready for review November 2, 2021 03:05
setup.cfg Outdated Show resolved Hide resolved
Copy link
Member

@dalthviz dalthviz left a comment

Choose a reason for hiding this comment

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

Thanks @CAM-Gerlach ! I left a suggestion and a comment/question. Besides that this LGTM 👍

Also, thank you @Kant-ain for the misspelling fix suggestion !

RELEASE.md Show resolved Hide resolved
setup.cfg Show resolved Hide resolved
Copy link
Member

@ccordoba12 ccordoba12 left a comment

Choose a reason for hiding this comment

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

Thanks @CAM-Gerlach for this! I left a couple of comments, otherwise looks good to me.

qtpy/__init__.py Show resolved Hide resolved
RELEASE.md Outdated Show resolved Hide resolved
RELEASE.md Outdated Show resolved Hide resolved
RELEASE.md Outdated Show resolved Hide resolved
RELEASE.md Outdated Show resolved Hide resolved
Copy link
Member

@ccordoba12 ccordoba12 left a comment

Choose a reason for hiding this comment

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

Thanks @CAM-Gerlach for your work on this!

@dalthviz dalthviz merged commit 53ce7b0 into spyder-ide:master Nov 22, 2021
@dalthviz
Copy link
Member

Thanks @CAM-Gerlach !!

@CAM-Gerlach
Copy link
Member Author

Thanks for your feedback and bearing with me on this @ccordoba12 and @dalthviz !

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.

Port packaging from deprecated legacy builder to current PEP 517 standards
5 participants