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

Initial implementation #1

Merged
merged 2 commits into from
Feb 9, 2023
Merged

Initial implementation #1

merged 2 commits into from
Feb 9, 2023

Conversation

nforro
Copy link
Member

@nforro nforro commented Feb 9, 2023

No description provided.

@nforro nforro force-pushed the implementation branch 3 times, most recently from 52b22a7 to 403cc33 Compare February 9, 2023 09:56
Copy link
Member

@TomasTomecek TomasTomecek left a comment

Choose a reason for hiding this comment

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

I am confused now: when I install the module to user sitelib, I can no longer import rpm:

// /src is a bindmount of this PR inside a container
[root@a59648fe38f0 src]# pip3 install --user .                                                                                                                                                                                                               
Processing /src      
  Installing build dependencies ... done                                                                                                                                                                                                                     
  Getting requirements to build wheel ... done                                                                                                                                                                                                               
  Installing backend dependencies ... done                                                                                                                                                                                                                   
  Preparing metadata (pyproject.toml) ... done                                                                                                                                                                                                               
Building wheels for collected packages: rpm                                                                                                                                                                                                                  
  Building wheel for rpm (pyproject.toml) ... done                                                                                                                                                                                                           
  Created wheel for rpm: filename=rpm-0.0.post7+g403cc33-py3-none-any.whl size=3497 sha256=bef24c750e69aafdc14073985ae4eecff4472bb3b7d8b03aebcb34b4a43ec97d                                                                                                 
  Stored in directory: /tmp/pip-ephem-wheel-cache-gmnf2sfk/wheels/a0/a1/77/062e875f5b546d9255c4403d3277b732c25c5e17cdbf8d14d3                                                                                                                                
Successfully built rpm                                                                                                                                                                                                                                       
Installing collected packages: rpm
Successfully installed rpm-0.0.post7+g403cc33
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv

[root@a59648fe38f0 src]# cd /

[root@a59648fe38f0 /]# python3 -c 'import rpm'                                                                                 
Exception: module 'rpm' has no attribute 'expandMacro'
Exception: module 'rpm' has no attribute 'expandMacro'
Exception: Failed to import system RPM module

setup.cfg Outdated Show resolved Hide resolved
tox.ini Show resolved Hide resolved
return
except Exception as e:
logger.error(f"Exception: {e}")
continue
Copy link
Member

Choose a reason for hiding this comment

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

hmm, the logic looks okay here: check all paths until one works, otherwise raise ImportError

@nforro
Copy link
Member Author

nforro commented Feb 9, 2023

I am confused now: when I install the module to user sitelib, I can no longer import rpm:

Does the container have RPM python bindings installed?
You can also try to enable debug logging: python -c 'import logging; logging.basicConfig(level=logging.DEBUG); import rpm'

Signed-off-by: Nikola Forró <[email protected]>
Signed-off-by: Nikola Forró <[email protected]>
@TomasTomecek
Copy link
Member

yes, the proper rpm bindings were installed

I don't know what went wrong exactly, let's keep it as it is right now and do another "usability testing" round before announcing this module publicly

@nforro
Copy link
Member Author

nforro commented Feb 9, 2023

Ok, Zuul is not enabled yet, so let me merge this manually.

@nforro nforro merged commit ab78f14 into main Feb 9, 2023
@delete-merged-branch delete-merged-branch bot deleted the implementation branch February 9, 2023 13:04
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.

3 participants