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

chore: Do not install “schema_source” to site-packages #2973

Merged
merged 2 commits into from
Feb 28, 2023

Conversation

musicinmybrain
Copy link
Contributor

Issue #, if available

None, but see #2825 (comment).

Description of changes

Adds "schema_source" and "schema_source.*" to the excludes for the call to find_packages in setup.py. Fixes unintentional installation of the new schema_source directory into site-packages since 1.60.0.

Since black now wraps the line anyway, alphabetize the excludes for easier examination.

Description of how you validated changes

Applied as a downstream patch in Fedora Linux’s python-aws-sam-translator package, where I originally discovered the prpblem.

Checklist

Examples?

N/A

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@musicinmybrain musicinmybrain requested a review from a team as a code owner February 28, 2023 01:05
Copy link
Contributor

@aahung aahung left a comment

Choose a reason for hiding this comment

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

Thanks. How did you spot this?

@GavinZZ
Copy link
Contributor

GavinZZ commented Feb 28, 2023

Nice, thanks!

@aahung aahung changed the title Do not install “schema_source” to site-packages chore: Do not install “schema_source” to site-packages Feb 28, 2023
@aahung
Copy link
Contributor

aahung commented Feb 28, 2023

@musicinmybrain does this block samtranslator from going into https://src.fedoraproject.org/rpms/python-aws-sam-translator?

@musicinmybrain
Copy link
Contributor Author

Thanks. How did you spot this?

I was working on updating the Fedora Linux package to 1.60.0, and when I did a test build, RPM produced an error due to installed-but-unpackaged files and directories (that is, ones not mentioned in the spec file’s %files list) under /usr/lib/python3.11/site-packages/schema_source/. As an RPM packager, if you don’t glob too broadly, it’s pretty easy to catch unexpected new files like this.

@musicinmybrain
Copy link
Contributor Author

@musicinmybrain does this block samtranslator from going into https://src.fedoraproject.org/rpms/python-aws-sam-translator?

What do you mean by block samtranslator from going into it?

I plan to apply the PR as a downstream patch until it is present in a future release, which will allow me to update the Fedora package to 1.60.0 and beyond. (At least, I can update it for the upcoming F38 release and development/Rawhide branch; stable Fedora releases usually get stuck on a particular version after a while due to dependency issues.)

Is that what you were asking?

@musicinmybrain
Copy link
Contributor Author

Thanks for following up on this so quickly, by the way.

@aahung
Copy link
Contributor

aahung commented Feb 28, 2023

I see, good to know. I am interested in similar check directly in sam-translator GH repo. Thanks for the info and the PR.

Is that what you were asking?

yeah, glad it doesn't block that.

@hoffa hoffa merged commit 4d00cff into aws:develop Feb 28, 2023
GavinZZ pushed a commit to GavinZZ/serverless-application-model that referenced this pull request Mar 2, 2023
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.

5 participants