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

spec: Package Python examples #432

Merged

Conversation

ppisar
Copy link
Contributor

@ppisar ppisar commented May 30, 2024

We already use it in F41 package. I'm only not sure since when %py3_shebang_fix is supported.

@j-mracek j-mracek self-assigned this May 30, 2024
@j-mracek
Copy link
Contributor

Macro is available on Fedora 39 - tested by rpm --eval '%{py3_shebang_fix}'

@ppisar
Copy link
Contributor Author

ppisar commented May 30, 2024

I found that macro in RHEL 9 and 8. I was unable to check RHEL 7.

@j-mracek
Copy link
Contributor

I think that this option is better then to replace #!/usr/bin/python. But may I ask you to add why you want to change the code?

The current code requires to have installed python-unversioned-command to make example functional.

@ppisar
Copy link
Contributor Author

ppisar commented May 30, 2024

I use the macro because all packaged files needs to conform the packaging guidelines. /usr/bin/env as found in the sources does not conform and rpmlint correctly warns on it.

Do you want me to add this explanation to the commit message?

What do you mean with "python-unversioned-command"? I cannot see it anywhere in the sources, neither in the built https://kojipkgs.fedoraproject.org//packages/createrepo_c/1.1.2/1.fc41/x86_64/python3-createrepo_c-1.1.2-1.fc41.x86_64.rpm.

What do you mean with "The current code requires [...] to make example functional"? Documentation files is exempted from adding RPM dependencies.

@j-mracek
Copy link
Contributor

Please may I ask you to add to commit message that the change is required by Fedora guidelines with a reference?

My previous commend about python-unversioned-command package was related to #!/usr/bin/python but in createrepo there is #!/usr/bin/env python, therefore not related at all. Apologizing.

%py3_shebang_fix macro corrects shebangs in the documentation files to
make them conforming to Fedora packaging guidelines
<https://docs.fedoraproject.org/en-US/packaging-guidelines/Python/#_shebangs>.
@ppisar ppisar force-pushed the package_python_examples branch from 601e83f to 1b5f1a0 Compare May 30, 2024 12:28
@ppisar
Copy link
Contributor Author

ppisar commented May 30, 2024

Done.

Copy link
Contributor

@j-mracek j-mracek left a comment

Choose a reason for hiding this comment

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

LGTM

@j-mracek j-mracek merged commit 0520f0c into rpm-software-management:master May 30, 2024
2 of 8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants