Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

fix: use pipx for installs in draw-zmk.yml (PEP 668) #118

Merged
merged 2 commits into from
Oct 15, 2024

Conversation

janwvjaarsveld
Copy link
Contributor

@janwvjaarsveld janwvjaarsveld commented Oct 14, 2024

Make workflow PEP 668 complaint, to avoid below errors in workflows.

Run python3 -m pip install keymap-drawer
error: externally-managed-environment

× This environment is externally managed
╰─> To install Python packages system-wide, try apt install
    python3-xyz, where xyz is the package you are trying to
    install.
    
    If you wish to install a non-Debian-packaged Python package,
    create a virtual environment using python3 -m venv path/to/venv.
    Then use path/to/venv/bin/python and path/to/venv/bin/pip. Make
    sure you have python3-full installed.
    
    If you wish to install a non-Debian packaged Python application,
    it may be easiest to use pipx install xyz, which will manage a
    virtual environment for you. Make sure you have pipx installed.
    
    See /usr/share/doc/python3.12/README.venv for more information.

note: If you believe this is a mistake, please contact your Python installation or OS distribution provider. You can override this, at the risk of breaking your Python installation or OS, by passing --break-system-packages.
hint: See PEP [6](https://github.com/janwvjaarsveld/aurora-corne-zmk-config/actions/runs/11332726345/job/31515457850#step:3:7)68 for the detailed specification.
Error: Process completed with exit code 1.

@caksoylar
Copy link
Owner

Thanks, I figured it's fine for CI but if it's yelling now then it's good to fix.

I didn't know pipx came installed on those runners now. Is it on the path? i.e. can we use pipx rather than python3 -m pipx now?

@janwvjaarsveld
Copy link
Contributor Author

Looks like it is on the path and we can indeed just use pipx. So I updated the PR.

@caksoylar caksoylar merged commit 49d801a into caksoylar:main Oct 15, 2024
1 check passed
@caksoylar
Copy link
Owner

Thank you!

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants