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

Move to a pure PEP621 project configuration. #387

Merged
merged 5 commits into from Nov 22, 2023
Merged

Move to a pure PEP621 project configuration. #387

merged 5 commits into from Nov 22, 2023

Conversation

freakboy3742
Copy link
Member

Inspired by beeware/toga#2229, a full PEP621 configuration update.

There's no functional difference; the one technical benefit (aside from keeping up with modern standards) is that because we're using setuptools_scm, we don't need to maintain MANIFEST.in any more. The source discovery process is also much simpler - it requiring no explicit setuptools configuration, as we're entirely relying on one of the "default" project layout patterns.

I've audited the generated tarballs, and they have identical content, except for:

  • the missing setup.cfg and MANIFEST.in files,
  • a missing not-zip-safe file in the egg-info. This file was needed in the days of eggs and easy-install, but is now considered deprecated.
  • minor changes to the METADATA file in the wheel:
    • A different format for authors and license
    • Slightly different URL definitions
    • No platform: any declaration. This has been subsumed by wheel tagging.

Also removes the Travis CI configuration, since that's long dead.

PR Checklist:

  • All new features have been tested
  • All new features have been documented
  • I have read the CONTRIBUTING.md file
  • I will abide by the code of conduct

Copy link
Collaborator

@dgelessus dgelessus left a comment

Choose a reason for hiding this comment

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

This seems like a good move to me 👍

Comment on lines +3 to +4
"setuptools==69.0.0",
"setuptools_scm==8.0.4",
Copy link
Collaborator

@dgelessus dgelessus Nov 22, 2023

Choose a reason for hiding this comment

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

Why the pins here instead of minimum versions like before? Surely we support more than just these exact versions.

(The setuptools pyproject.toml docs say that at least setuptools 61.0.0 is required for pyproject.toml support.)

Copy link
Member Author

Choose a reason for hiding this comment

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

Reproducibility. For example, the dynamic argument in pyproject.toml wasn't required on setuptools 68.0, but it is required on 69.0. If you use an open ended pin, a project configuration that works on the day of release can break in the future.

With a hard pin, we know the configuration works with this specific set of versions, and that won't change. Those versions might not be compatible with future versions of pip, Python etc - but then, we can't make any guarantees about what might happen in future regardless.

Copy link
Member Author

Choose a reason for hiding this comment

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

To clarify further: build-requires specify the environment that will be created specifically for the purpose of wheel creation. It's guaranteed to be an isolated environment (unless you specifically disable isolation, in which case you're on your own), so we don't need to maintain maximum compatibility with the end-user's environment. You're specifying the exact environment that you want to be present to build the wheel; an open ended pin undermines that, because we can't guarantee that the build environment will match a configuration that we know works.

@freakboy3742 freakboy3742 merged commit 01cd241 into main Nov 22, 2023
19 checks passed
@freakboy3742 freakboy3742 deleted the pep621 branch November 22, 2023 21:56
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.

None yet

3 participants