Closed joaoantoniocardoso closed 2 weeks ago
works great once it works! but I had to manually configure a local python3.11 with pyenv. can we add a check for python version and add hints on how to set it up?
pyenv install 3.11 && pyenv local 3.11
@Williangalvani is the command python3.11
available when using pyenv, or should I use some pyenv command to figure it out?
@Williangalvani is the command
python3.11
available when using pyenv, or should I use some pyenv command to figure it out?
once you do pyenv local 3.11
, python3.11 is available on path
altenatively, pyenv versions
show the versions available on your system:
➜ ~ pyenv versions
* system (set by /home/will/.pyenv/version)
3.7.9
3.8.18
3.11.9
@Williangalvani
Okay, I rewrote the Python check code to automatically use pyenv if it's available
working well locally here
@Williangalvani I just rebased, some of the commits were already merged.
This migrates the hooks/pre-push to use Poetry directly, and makes all the files contained within the project's virtual environment, instead of loading files on the users' folder, making the development environment more replicable.
To use the pre-push, the user must have a Python 3.11 available. Before, it would use whatever the system's Python was, failing to run when the user had 3.12 or 3.10 for example.
To test:
\rm -rf .venv poetry.lock
.hooks/pre-push
To check whether it had any impact on the normal installation:
joaoantoniocardoso/blueos-core
:fix-pre-push
on BlueOSI have tested it myself, but more samples are welcome.
After this patch is merged, we can all clean our system:
ls "$(python -m site --user-site)"
ls "$(python -m site --user-base)/bin"