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

Update pyenv-setup script #992

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

dacook
Copy link
Member

@dacook dacook commented Jan 22, 2025

If an old version of python is active, the install got skipped (at least, on Mac).
This script now checks if the specified virtual env is active or not.

If an old version of python is active, this just gets skipped. This script now checks if the specified virtual env is active or not.
@dacook dacook self-assigned this Jan 22, 2025
@dacook
Copy link
Member Author

dacook commented Jan 24, 2025

Test

pyenv uninstall 3.10.16 # assuming you already had it

~/projects/ofn-install $ pyenv version
pyenv: version `ofn-install-3.10.16-a8' is not installed (set by /Users/dcook/projects/ofn-install/.python-version)
~/projects/ofn-install $ bin/pyenv-install
python-build: use [email protected] from homebrew
python-build: use readline from homebrew
Installing Python-3.10.16...
python-build: use tcl-tk from homebrew
python-build: use readline from homebrew
python-build: use ncurses from homebrew
python-build: use zlib from xcode sdk

Installed Python-3.10.16 to /Users/dcook/.pyenv/versions/3.10.16
Collecting ansible==8.5.0
  Using cached ansible-8.5.0-py3-none-any.whl (47.5 MB)
Collecting ansible-lint==6.22.2
  Using cached ansible_lint-6.22.2-py3-none-any.whl (297 kB)
...
Installing collected packages: resolvelib, typing-extensions, tomli, subprocess-tee, ruamel.yaml.clib, rpds-py, pyyaml, pygments, pycparser, platformdirs, pathspec, packaging, mypy-extensions, mdurl, MarkupSafe, filelock, click, bracex, attrs, yamllint, wcmatch, ruamel.yaml, referencing, markdown-it-py, jinja2, cffi, black, rich, jsonschema-specifications, cryptography, jsonschema, ansible-core, ansible-compat, ansible, ansible-lint
Successfully installed MarkupSafe-3.0.2 ansible-8.5.0 ansible-compat-24.10.0 ansible-core-2.15.13 ansible-lint-6.22.2 attrs-24.3.0 black-24.10.0 bracex-2.5.post1 cffi-1.17.1 click-8.1.8 cryptography-44.0.0 filelock-3.17.0 jinja2-3.1.5 jsonschema-4.23.0 jsonschema-specifications-2024.10.1 markdown-it-py-3.0.0 mdurl-0.1.2 mypy-extensions-1.0.0 packaging-24.2 pathspec-0.12.1 platformdirs-4.3.6 pycparser-2.22 pygments-2.19.1 pyyaml-6.0.2 referencing-0.36.1 resolvelib-1.0.1 rich-13.9.4 rpds-py-0.22.3 ruamel.yaml-0.18.10 ruamel.yaml.clib-0.2.12 subprocess-tee-0.4.2 tomli-2.2.1 typing-extensions-4.12.2 wcmatch-10.0 yamllint-1.35.1

[notice] A new release of pip is available: 23.0.1 -> 24.3.1
[notice] To update, run: python -m pip install --upgrade pip
~/projects/ofn-install $ pyenv version
ofn-install-3.10.16-a8 (set by /Users/dcook/projects/ofn-install/.python-version)
~/projects/ofn-install $ ansible --version
ansible [core 2.15.13]
  config file = /Users/dcook/projects/ofn-install/ansible.cfg
  configured module search path = ['/Users/dcook/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /Users/dcook/.pyenv/versions/3.10.16/envs/ofn-install-3.10.16-a8/lib/python3.10/site-packages/ansible
  ansible collection location = /Users/dcook/.ansible/collections:/usr/share/ansible/collections
  executable location = /Users/dcook/.pyenv/versions/ofn-install-3.10.16-a8/bin/ansible
  python version = 3.10.16 (main, Jan 24 2025, 15:22:15) [Clang 16.0.0 (clang-1600.0.26.6)] (/Users/dcook/.pyenv/versions/3.10.16/envs/ofn-install-3.10.16-a8/bin/python)
  jinja version = 3.1.5
  libyaml = True

Looks good to me

@dacook dacook marked this pull request as ready for review January 24, 2025 04:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Code review 🔎
Development

Successfully merging this pull request may close these issues.

1 participant