Skip to content

Conversation

@gforcada
Copy link
Member

On jenkins jobs, this simplifies so much the management of python versions that we can even test it directly on python pre-releases (3.14a4 right now) 🌟

@gforcada
Copy link
Member Author

We need to install uv on Node5 though, @petschki are you responsible of it? 🤔

@petschki
Copy link
Member

Yes. Will do today.

@petschki
Copy link
Member

Done on Node 5 ... also installed /srv/python3.14

@gforcada
Copy link
Member Author

Oh, you don't need to install it, uv takes care of it ✨

@petschki
Copy link
Member

Ok ... thats nice 👍🏼

@mauritsvanrees
Copy link
Member

Looks good to me. Hard to really say without trying it for real. I must say I have not tried this part of uv yet.

Also, 3.14 will fail for any Plone version. Zope needs to be updated, and before that AccessControl, RestrictedPython and other zope packages with C code need to be updated.

Copy link
Member

@davisagli davisagli left a comment

Choose a reason for hiding this comment

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

I would factor the virtualenv creation into a separate script that can be called from the others -- but it's short enough that it's fine either way.

@jensens
Copy link
Member

jensens commented Feb 24, 2025

To summarize my code comments: It is enough to do

UV_PYTHON={py}
uv venv
uv pip install -r requirements.txt
uv run buildout ....

@davisagli
Copy link
Member

Really I think you can just do:

uv run -p {py} --with-requirements requirements.txt buildout ...

@jensens
Copy link
Member

jensens commented Feb 25, 2025

As a one shot as it is in Jenkins, yes. Or uvx -p {py} --with-requirements requirements.txt buildout ... to reduce it to the max ;)

@gforcada gforcada force-pushed the use-uv branch 3 times, most recently from c9acb6e to 1c74258 Compare March 1, 2025 18:35
@stevepiercy
Copy link

Kind of off-topic, but does uv run -p {py} --with-requirments ... use uv's pip API? I couldn't find the answer in the reference docs for uv-run. I assume that it does not use the pip API, since it's not mentioned in this context.

I recently switched from the pip API to using uv directly in Plone Sphinx Theme, and now I feel like a big boy.💪

@davisagli
Copy link
Member

@stevepiercy No, I don't think so. My understanding is that uv run will automatically create a virtualenv using the dependencies specified in the command (using --with or --with-requirements) or dependencies specified in pyproject.toml.

The uv pip commands are meant for interoperating with other tools that expect things like a virtualenv in a specific location, or a requirements.txt file instead of uv.lock.

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

Successfully merging this pull request may close these issues.

7 participants