-
Notifications
You must be signed in to change notification settings - Fork 40
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
egg-info syntax wrong in epel7.spec #259
Comments
Is your module available for testing? |
Yes, for instance see at Thank you very much! |
Does PR #260 fix that problem? |
Yes! I applied the #260 and it works because the version now includes the "post8". I wonder if the "post" in the rpm version is a good choice. Anyway now it works. |
No, not as is. That would be problematic as described in Fedora's versioning guidelines (https://docs.fedoraproject.org/en-US/packaging-guidelines/Versioning/#_unsortable_versions) pyp2rpm may simply need a template filter to transform the version into something usable with '~' or '^'. (As in the "Versioning prereleases with tilde" section of the above document) |
Note that neither works in RHEL 7. |
Thanks, @hroncok . I was going to ask you, since I'd found this pagure ticket suggesting that support had been backported to RHEL >= 6: |
Oh, sorry. ^ is not supported, ~ might be. |
I've updated #260 . It should be closer to what's needed to support tilde / caret in versions properly. None of the tests are updated yet, so those will all fail. But this at least gets some code out for review and discussion. (and of course, we'll need to actually test rpm with tilde versions on RHEL 6 and 7.) |
Another trouble with EPEL7 is the requirement ( pyp2rpm uses syntax like I feel fine with
which is EPEL7 compatible. Instead, |
Please open a separate issue with that information. If you can, please test the latest changes in #260. I still need to ensure that they're compatible with EPEL6 and 7, and get those changes reviewed. Tests are passing, at least, so that branch should be almost ready. |
I tried the latest change in #260. They work for me.
with
which is definitively better for me. |
I can vouch for the case change issues in CentOS 7. Someone decided that they were smarter than the package maintainers and decided to inconsistently switch python module names to lower case, and pretty much discarded the practice for CentOS 8 and fedora. |
I am afraid I have no idea what are you talking about here. Who decided to do what exactly? |
Checking back on this. Many RHEL python RPMs have names converted to lower case, irrelevant of the name of package at pypi.org, and irrelevant of the name of the tarball, which itself may have a different case. It's quite maddenning. The "PyYAML" package published at pypi.org, for example, has a tarball named "PyYAML-6.0.0.tar.gz. But the package in RHEL is published as python-pyyaml-3.12-1.3.3l8. It's awkward enough that it's so far out of date, but the flip-flopping cases make generating matching .spec files and Source entries extra awkward. Fortunately, the modern syntax of "Source0: %{pypi_source} PyYAML" works very well to grab the matching tarball, and a consistent lower case for the .spec file and dependencies could help. RHEL is not completely consistent about this, so it still often needs tuning. Unfortunately, the case change is erratic. So if you publish the same .spec file for Fedora and RHEL of various releases, it's a bit of a crap shoot. It's also a bit of a crap shoot with whether or not the package has "python%{package_version}-%{pypi_name}" as its name, or just %{pypi_name}, especially for software actually published at Red Hat like "ansible" and "ansible-core". Been there, done that with my build suite over at https://github.bom/nkadel/ansiblerepo/ |
falon, I agree that the "python3-" dependency syntax. It should always always be "python%{python3_pkgversion}-" to support building with other python releases, such as python38 on RHEL 8. |
Hello,
with the default
epel7.spec
if I runpyp2rpm -o epel7 -t epel7 -b 3 -s dist/<mypackagename>-0.1.post8.tar.gz
in
%files -n python%{python3_pkgversion}-%{pypi_name}
I read:%{python3_sitelib}/<mypackagename>-%{version}-py%{python3_version}.egg-info
This is wrong. I should see:
%{python3_sitelib}/<mypackagename>-%{version}.post8-py%{python3_version}.egg-info
It lacks of .post8. Now I'm fixing by hands... could you help me to modify the template in order to let pyp2rpm to write the right line?
Thank you very much
Ps: the issue is the same for fedora spec too.
The text was updated successfully, but these errors were encountered: