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

Check for pyenv in check-requirements -d #294

Open
max-moser opened this issue May 31, 2022 · 0 comments
Open

Check for pyenv in check-requirements -d #294

max-moser opened this issue May 31, 2022 · 0 comments

Comments

@max-moser
Copy link
Contributor

max-moser commented May 31, 2022

Introduction

If the cookiecutter'd version of InvenioRDM specifies a different Python version than the one globally installed, pyenv (or asdf with asdf-python) is required to create a virtual environment with the specified Python version.
Example: The installed Python is 3.10, but the cookiecutter'd InvenioRDM instance requires 3.8:
image

Note: In the screenshot, pipenv v2022.5.2 is used.

Problem

pipenv is a direct dependency of invenio-cli and is thus very hard to miss.
However, becausepipenv can work without a Python version manager (i.e. pyenv or asdf) if the global Python version matches the required one from the Pipfile, they are not strict dependencies of pipenv.
Thus, pyenv/asdf are easy to miss and can lead to unexpected errors (see screenshot above).

Describe the solution you'd like

I feel that check-requirements --development should check if one of the Python version managers is installed, because it's likely that the Pipfile requires a different Python version than the one installed globally.

Alternatives that you've considered

We could remove the Python version requirement from the Pipfile in the cookiecutter, causing the instance to use whatever is installed.
However, this would give up some control over the Python version in use, and thus open up other possibilities for errors.

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

1 participant