Skip to content

fix: do not let uv create the virtual environment#1218

Open
SMoraisAnsys wants to merge 6 commits intomainfrom
fix/do-not-let-uv-create-venv
Open

fix: do not let uv create the virtual environment#1218
SMoraisAnsys wants to merge 6 commits intomainfrom
fix/do-not-let-uv-create-venv

Conversation

@SMoraisAnsys
Copy link
Contributor

@SMoraisAnsys SMoraisAnsys commented Mar 20, 2026

This PR homogenize the creation of virtual environments in build-wheelhouse and check-license actions by creating the venv using python.


Tip

Using uv to create the venv can lead to a situation where uv installs a new version of python. Recently I was refactoring pyaedt's GH workflow and one of them consist in creating a wheelhouse in Rocky Linux. However, the python provided by actions/setup-python do not work due to GLIC incompatibility. Instead of failing, the workflow kept moving and uv was installing a new python version under the hood. Note that this python is compatible with the Rocky Linux container and allow us to proceed smoothly.

Extra question: should we allow the use of python uv when setting python through our action ? Here could be the associated implementation #1219

@SMoraisAnsys SMoraisAnsys requested a review from a team as a code owner March 20, 2026 08:03
@github-actions github-actions bot added the fix Pull requests related to resolving problems or errors label Mar 20, 2026
Copy link
Contributor

@AlejandroFernandezLuces AlejandroFernandezLuces left a comment

Choose a reason for hiding this comment

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

LGTM, I would have preferred to use the faster uv command to be favoured, but I understand the issue you mentioned.

@RobPasMue RobPasMue changed the title fix: do not let uv create venv fix: do not let uv create the virtual environment Mar 20, 2026
Copy link
Member

@RobPasMue RobPasMue left a comment

Choose a reason for hiding this comment

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

LGTM!

@SMoraisAnsys SMoraisAnsys self-assigned this Mar 20, 2026
@SMoraisAnsys
Copy link
Contributor Author

SMoraisAnsys commented Mar 20, 2026

LGTM, I would have preferred to use the faster uv command to be favoured, but I understand the issue you mentioned.

I think we have had issues in the past when using uv to create venv and that's why we moved to mainly using python in all our action. I can't remember the reason though :/ Could have been related to the use of --system in the past.

@RobPasMue
Copy link
Member

LGTM, I would have preferred to use the faster uv command to be favoured, but I understand the issue you mentioned.

I think we have had issues in the past when using uv to create venv and that's why we moved to mainly using python in all our action. I can't remember the reason though :/ Could have been related to the use of --system in the past.

Yep - uv tends to create a virtual environment for you, and we ended up swtching to the --system flag. But it was a bit of pain if I remember properly to handle it consistently in our actions

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fix Pull requests related to resolving problems or errors

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants