-
Notifications
You must be signed in to change notification settings - Fork 36
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
port setuptools options to declarative config #40
Conversation
LGTM some potential follow-up improvements (not sure what @hodgestar thinks about these):
|
I thought about adding
However, now that I check again, it is only done for wheel, not for sdist, and the real reason COPYING is even in the sdist is due to MANIFEST.in, so... we can move it from MANIFEST.in to setup.cfg |
I agree that tests should not really be included in the final wheel, but that's a separate topic. It should be sufficient to distribute them via MANIFEST.in, but you might also want to move them to a top-level tests/ directory. |
@@ -1,8 +1,7 @@ | |||
include ChangeLog | |||
include COPYING |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we put just this line back? I actually prefer if files are explicitly listed in MANIFEST.in
rather than having to guess what other logic elsewhere is including files.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am fine if it is also listed in setup.cfg -- for me that's actually separate information, i.e. "this is a file containing the license" while MANIFEST.in is "please include this file in the source distribution".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's a file specifically called out in the metadata, just like py_modules
or packages
. But instead of declaring it as an importable source file, it's declared as a dist-info file which must be installed as wheel metadata. Since it must be installed as wheel metadata, it also must be included in the source dist in order to guarantee it makes its way into the wheel, and is thus guaranteed to be collected during the dist creation.
I disagree with your analysis -- I don't view this as guessable logic -- but if you still want it I'll put it back.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would still like it back -- I have been bitten so often by files not being included in the source distribution that I just want one place that I can look.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, will do.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you! Apologies for being a pain about it. :|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lol, I wish every PR review was this simple to solve.
"Looks good, just please include this minor nitpicky line that I really like even though it's a no-op."
(I mean, it's lots better than "I disagree with the functionality and would rather you write your own separate program to do X". I've gotten that once or twice for stuff I thought was a no-brainer bugfix.)
Other than the small change I requested, looks good to me too. I agree that moving tests into a |
My main reason for requesting was that the license file would be present in the dist-info all the time. Also it potentially helps distro tooling which can automate python packaging better (at least in Fedora we require that the license file is declared separately so we can ensure it is always installed even if the operator chooses not to install documentation files). |
'Topic :: Text Processing :: Markup :: XML' | ||
], | ||
keywords = ['python.templating.engines'], | ||
packages = packages, | ||
test_suite = 'genshi.tests.suite', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't recall if it's been discussed in this project yet, but the test command is deprecated.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That should really be its own issue, and actually this coincides very well with the other mention here about reorganizing into a tests/ directory.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed -- let's leave messing with the test suite out of things for now.
This is not needed for wheels, since the default license files pattern already finds the current name of this file. However, it is needed for sdist in order to guarantee the file gets disted. Currently, that file gets disted anyway... but only because MANIFEST.in forces it to be. So adding the license_files metadata lets us drop the info from MANIFEST.in; however, as the project maintainer finds it easier to look in only one file for this information, this is being left in despite its redundancy.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! Will merge as soon as CI has finished running (assuming it runs successfully, although hard to see why it wouldn't).
It's been two days but the CI finally passed. ;) |
Merged! @eli-schwartz Thank you! |
No description provided.