View previous topic :: View next topic |
Author |
Message |
mauricev Apprentice
Joined: 22 Mar 2004 Posts: 202
|
Posted: Fri Apr 26, 2024 5:45 am Post subject: trying to use pip inside an ebuild |
|
|
I am trying to install mongodb 7.0.8. I have an ebuild for 6.x and trying to get it to work, now for 7.
Here's an excerpt
Code: | set -x
python3 -m pip install --target ./site_scons requirements_parser; \
|
This command results in
Code: | WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x7fc70094b710>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution')': /simple/cryptography/ |
So it appears that within the emerge environment, the network is not available. I am assuming that emerge creates a virtual environment for pip to run in, but it apparently blocks the Internet. Or is it because pip is actually executing on the real OS? |
|
Back to top |
|
|
Genone Retired Dev
Joined: 14 Mar 2003 Posts: 9604 Location: beyond the rim
|
Posted: Fri Apr 26, 2024 7:23 am Post subject: |
|
|
Yes, by default ebuilds are isolated from network access for security and reliability reasons. Also emerge itself does not create a virtual environment, that would be the job of the ebuild/eclass if it needs that (the idea doesn't sound right to me though).
The main question though is why you'd want to call pip inside your ebuild? Dependencies should be specified by the ebuild using *DEPEND, installing them via pip will just cause a mess.
Last edited by Genone on Fri Apr 26, 2024 7:24 am; edited 1 time in total |
|
Back to top |
|
|
logrusx Advocate
Joined: 22 Feb 2018 Posts: 2366
|
Posted: Fri Apr 26, 2024 7:23 am Post subject: Re: trying to use pip inside an ebuild |
|
|
mauricev wrote: |
So it appears that within the emerge environment, the network is not available. |
Of course it isn't. This is a security hazard.
You don't need ebuilds to install python packages, either use virtual environment or install them per user and not globally.
If you still need an ebuild for something else, you need to store the necessary files somewhere and add them to SRC_URI so portage can download them for you.
Best Regards,
Georgi |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|