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

hawkey is not published on PyPI and the Fedora package has no .egg-info #264

Closed
AdamWill opened this issue Feb 19, 2017 · 9 comments
Closed

Comments

@AdamWill
Copy link
Contributor

AdamWill commented Feb 19, 2017

The former problem makes it difficult to test anything that uses hawkey with tox. The latter means you cannot list hawkey as a requirement in Python projects, because setuptools, pip etc. etc. can't tell that it's installed.

@ignatenkobrain
Copy link
Contributor

  1. most probably you should not use hawkey directly (but use DNF)
  2. PyPI is for python packages while libdnf is moving a lot and depends on packages which are not on pypi (so it's just useless to have it there)

@AdamWill
Copy link
Contributor Author

All I wanted was a NEVRA parser, and hawkey is about the only thing that had one.

@kparal
Copy link

kparal commented Mar 16, 2017

We also need a NEVRA parser in taskotron (as a python library) and thus we'd also appreciate having hawkey in pypi. Currently we're using hawkey.split_nevra(). Igor, what is the best available replacement if we want to get rid of hawkey dependency? Thanks.

@AdamWill
Copy link
Contributor Author

AdamWill commented Mar 16, 2017

Yes, that's the same thing I'm using, that I couldn't find an alternative for. I was expecting there to be some standard Python bindings for typical 'working with RPMs' functions but couldn't find any anywhere.

@ignatenkobrain
Copy link
Contributor

@kparal ideally, you should not do this at all ;) second best option is to expose this function from RPM API... third best option is to implement it yourself

@kparal
Copy link

kparal commented Aug 24, 2017

@ignatenkobrain Can you clarify? What do you mean by "you should not do this at all"? Of course I need NEVRA parsing, when I get a file name and need to figure out the details. RPM API doesn't seem to have this, of course it would be nice if it had. That's why we started using hawkey in the first place. I won't even comment on the idea of every program implementing its our NEVRA parser with its own set of bugs...

@ignatenkobrain
Copy link
Contributor

@kparal for example, filename doesn't contain epoch.. Second thing is that filename doesn't tell anything about content.. so you should use RPM to read its headers which means you don't need to split NEVRA because RPM already did it for you..

I don't know your full use-case, so I'm just guessing.

RPM has that function internally, but it is not exposed, so you could work on properly exposing it for instance.

@AdamWill
Copy link
Contributor Author

AdamWill commented Aug 24, 2017

We are often working with just file names, not actual files. (Or even just NVRA strings provided by, e.g., Bodhi.)

@kparal
Copy link

kparal commented Aug 25, 2017

Correct, most of the time, we receive a string and process it, and based on that, we do stuff. Very often we don't have the actual RPM downloaded (and doing that would be a waste of resources). I'm aware of the epoch, but that's not important for us too often (and when it is, we query koji to learn it).

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

No branches or pull requests

3 participants