-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Building Pint from PyPi to RPM wrongly resolves version #1771
Comments
packages I have seen affected so far:
but surprising, the:
is not affected. As indicated by original report above it depends how package is defined. This is not |
I have played some time with this, and I believe the issues sprout from using AFAIK #1821 will fix at least the installed PKG_INFO version which breaks runtime. Something that may/may not be fixed is get_metadata script. For I had some success with following patch:
|
in the mean time, my workaround for
Please note, I suspect not only Version is invalid, but dependencies as well, so this is a very crude workaround. |
fpm has a built-in way to do this: |
I'm trying to find a solution for this but I can't even get Pint downloaded to even try packaging. If I use the same
|
Attempting to install a source package fails with pip:
I confess I"m not sure exactly how to resolve this right now. Until I can get pip to download/install this package without crashing, I'm probably stuck. |
it doesn't change what is important for python runtime, i.e. PKG-INFO version. The problem is that Python will check at runtime if dependencies are matching by checking PKG-INFO
So I modify |
Ahh I see what you mean. Thanks for helping me understand more :)
…On Wed, Nov 10, 2021 at 2:29 AM rooterkyberian ***@***.***> wrote:
in the mean time, my workaround for rpm packages:
fpm has a built-in way to do this: fpm -s rpm -t rpm -v 1.2.3 whatever.rpm
will read whatever.rpm and set the version to 1.2.3 and write a new rpm
output.
it doesn't change what is important for python runtime, i.e. PKG-INFO
version.
The problem is that Python will check at runtime if dependencies are
matching by checking PKG-INFO
If not, error like this can be returned:
pkg_resources.DistributionNotFound: The 'importlib-resources>=5'
distribution was not found and is required by ocrmypdf
So I modify importlib_resources-0.0.0-py3.6.egg-info/PKG-INFO with the
version I know was requested in the first place.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#1771 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AABAF2S3EYBCECE4WFE6SYLULJCSBANCNFSM4ZCQQ3CQ>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
|
Since Pint version 1.10 fpm cannot build proper version of this project with distutils. It downloads proper version but in metadata it shows
"version"=>"0.0.0"
. I guess it's not only with RPM, but only tried it with it.I believe it's because Pint project changed distribution method to something called
zest.releaser
. They removed version from setup.py and moved it to different file which is used somehow in setup.cfg. I have no idea how it works and I'm not sure if this is solvable here.I tried to use
--version
flag but it didn't changed the output package version. Maybe there is some different flag to set the output version so I could use it as a workaround?The text was updated successfully, but these errors were encountered: