-
Notifications
You must be signed in to change notification settings - Fork 321
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
Use micropipenv for installing dependencies #367
Conversation
Can one of the admins verify this patch? |
3 similar comments
Can one of the admins verify this patch? |
Can one of the admins verify this patch? |
Can one of the admins verify this patch? |
# Install pipenv to the separate virtualenv to isolate it | ||
# from system Python packages and packages in the main | ||
# virtualenv. Executable is simlinked into ~/.local/bin | ||
# to be accessible. This approach is inspired by pipsi | ||
# (pip script installer). | ||
function install_pipenv() { | ||
echo "---> Installing pipenv packaging tool ..." | ||
VENV_DIR=$HOME/.local/venvs/pipenv | ||
virtualenv_bin "$VENV_DIR" | ||
$VENV_DIR/bin/pip --isolated install -U pipenv | ||
mkdir -p $HOME/.local/bin | ||
ln -s $VENV_DIR/bin/pipenv $HOME/.local/bin/pipenv | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pretty sure this change will affect more than Fedora though...
Yes, the process here is different because the content in version folders is generated via distgen. Nevertheless, I understand what you are trying to say and will take a look at this possibility. |
Cool, thanks! My few bits here if this approach would be accepted.
[1] thoth-station/s2i-thoth#39 |
Have micropipenv as RPM would be very good! I am afraid about one thing — the lack of Python 2 compatibility. That would mean that we would be able to use micropipenv only for Python 3 images which would make our situation a little bit more complicated and resulting images different in this aspect. On the other hand, micropipenv is only ~500 lines of code and I have a lot of experience with writing code compatible with multiple Pythons. Would you be interested in adding support for EOL Python? I'm willing to help you with packaging and add support for more Python versions. |
If python2 support helps here, definitely.
Awesome, combining efforts is always a good idea! 👍 I just shooted first possible fixes in [2]. I would appreciate your input. Before we dive into this - what about considering "promoting" micropipenv to a tool that can handle different file formats (pip-tools/poetry/pipenv) and serve as a layer for installing python packages with possible error handling? Python s2i builds would not need to bundle other tools as pipenv/poetry. |
There would be also benefits on our (Thoth) side. We automatically parse build error logs and having one type of stdout/stderr logging (that would be pip output in this case) would definitely make our lives easier for data aggregation. |
Let's close it for now. Our possibilities are summarized in #368 |
No description provided.