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

feat(pipenv): support dynamic python selection #6036

Merged
merged 22 commits into from
Apr 30, 2020
Merged

feat(pipenv): support dynamic python selection #6036

merged 22 commits into from
Apr 30, 2020

Conversation

viceice
Copy link
Member

@viceice viceice commented Apr 23, 2020

Co-Authored-By: Rhys Arkins <rhys@arkins.net>
@viceice
Copy link
Member Author

viceice commented Apr 23, 2020

we can check pipfile.lock (json) for used python version too:
image

https://github.com/pypa/pipfile#pipfilelock

@rarkins
Copy link
Collaborator

rarkins commented Apr 23, 2020

we can check pipfile.lock (json) for used python version too:

Should come from the Pipfile itself though? I would guess that if the Pipfile specifies it then it's in the lock, but otherwise not.

@viceice
Copy link
Member Author

viceice commented Apr 24, 2020

I haven't found any Pipfile(.lock) with a pipenv version defined.

@viceice viceice requested a review from rarkins April 24, 2020 08:00
@viceice viceice marked this pull request as ready for review April 25, 2020 17:12
JamieMagee
JamieMagee previously approved these changes Apr 27, 2020
lib/manager/pipenv/artifacts.ts Outdated Show resolved Hide resolved
@rarkins
Copy link
Collaborator

rarkins commented Apr 29, 2020

Waiting on renovatebot/docker-python#30

@rarkins
Copy link
Collaborator

rarkins commented Apr 29, 2020

I'll fix this up

@rarkins
Copy link
Collaborator

rarkins commented Apr 29, 2020

Command failed: docker run --rm --name=renovate_python --label=renovate_child -v "/tmp/renovate/repos/github/renovate-tests/deepbedmap":"/tmp/renovate/repos/github/renovate-tests/deepbedmap" -v "/tmp/renovate/cache":"/tmp/renovate/cache" -v "/tmp/renovate/cache/others/pipenv":"/tmp/renovate/cache/others/pipenv" -e PIPENV_CACHE_DIR -w "/tmp/renovate/repos/github/renovate-tests/deepbedmap" renovate/python:3.7 bash -l -c "pip install pipenv && pipenv lock"
ERROR: Could not install packages due to an EnvironmentError: [Errno 13] Permission denied: '/usr/local/pyenv/versions/3.7.7/lib/python3.7/site-packages/certifi'
Consider using the `--user` option or check the permissions.

WARNING: You are using pip version 19.2.3, however version 20.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.

Example: renovate-tests/deepbedmap#3

@@ -28,14 +54,20 @@ export async function updateArtifacts({
const localPipfileFileName = join(config.localDir, pipfileName);
await outputFile(localPipfileFileName, newPipfileContent);
const localLockFileName = join(config.localDir, lockFileName);
const cmd = 'pipenv lock';
const cmd = ['pip install pipenv', 'pipenv --user lock'];
Copy link
Collaborator

Choose a reason for hiding this comment

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

Won't this install pipenv even for users who are running with binarySource=auto?

@rarkins
Copy link
Collaborator

rarkins commented Apr 29, 2020

@viceice perhaps we need to give user 1000 permissions on Permission denied: '/usr/local/pyenv/versions/3.7.7/lib/python3.7/site-packages/ ?

@viceice
Copy link
Member Author

viceice commented Apr 29, 2020

Will look at it

@viceice
Copy link
Member Author

viceice commented Apr 30, 2020

@rarkins why not always install pipenv on run? So we don't need it in full image. I think pip will do nothing, if it's already installed.

@rarkins
Copy link
Collaborator

rarkins commented Apr 30, 2020

@rarkins why not always install pipenv on run? So we don't need it in full image. I think pip will do nothing, if it's already installed.

If people are running this in non-Docker I don't think we should be installing software.

@rarkins rarkins merged commit df33e72 into master Apr 30, 2020
@rarkins rarkins deleted the feat/pipenv branch April 30, 2020 05:12
@renovate-release
Copy link
Collaborator

🎉 This PR is included in version 19.224.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 16, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

pipenv with Python 3.8 not work
4 participants