Skip to content

uv integration#272

Closed
behrica wants to merge 15 commits into
clj-python:masterfrom
behrica:uv
Closed

uv integration#272
behrica wants to merge 15 commits into
clj-python:masterfrom
behrica:uv

Conversation

@behrica

@behrica behrica commented Aug 31, 2025

Copy link
Copy Markdown
Contributor

@behrica behrica changed the title uv integarion uv integration Aug 31, 2025
@behrica

behrica commented Aug 31, 2025

Copy link
Copy Markdown
Contributor Author

No idea why the CI tests fail for MacOS....

In general, I cannot test the code under MacOS, which somebody should do and eventualy adapt the docu.
'uv' does run on MacOs, it says.

comment about performance and missing progress logging
use "--managed-python"
@jjtolton

jjtolton commented Sep 1, 2025

Copy link
Copy Markdown
Contributor

No idea why the CI tests fail for MacOS....

In general, I cannot test the code under MacOS, which somebody should do and eventualy adapt the docu. 'uv' does run on MacOs, it says.

I can try on macos later this week.

@jjtolton

jjtolton commented Sep 1, 2025

Copy link
Copy Markdown
Contributor

No idea why the CI tests fail for MacOS....
In general, I cannot test the code under MacOS, which somebody should do and eventualy adapt the docu. 'uv' does run on MacOs, it says.

I can try on macos later this week.

Ah, I've seen this before. This error might have nothing to do with uv, this might be a JVM silicon chip compatibility issue.

@jjtolton

jjtolton commented Sep 1, 2025

Copy link
Copy Markdown
Contributor

I have some concerns with uv.clj.

  1. The file needs some overall cleanup
  2. I'm not sure why we are writing the pyproject.toml in the first place, but we should be careful not to overwrite an existing one. Does this need to be configured? Does it need to be merged with an existing .toml file?
  3. There are unneeded dependencies in the file

@behrica

behrica commented Sep 1, 2025

Copy link
Copy Markdown
Contributor Author

I'm not sure why we are writing the pyproject.toml in the first place, but we should be careful not to overwrite an existing one. Does this need to be configured? Does it need to be merged with an existing .toml file?

This is the way uv works. uv requires a file on disk with the dependencies.
I would not go for a merge approach.
This feature is in my view only suitable for "very simple" situations, where the pyproject.toml only contains python dependencies. If a user has any need for other configuration, he should not use the feature.
But we should keep in mind, that this is for a "clojure project" which uses python libraries.
So there should not be any need for complex configurations in pyproject.toml, like a "python build"
A quickstart for 90 % of the cases, specialy tailored of using libpython-clj

Without a generated pyproject.toml we cannot have python deps in python.edn.

@behrica

behrica commented Sep 1, 2025

Copy link
Copy Markdown
Contributor Author

without pyproject.toml generation the "only" functionality of the setup-fn would be to run "sync uv".
(and then we don't need this feature)

@behrica

behrica commented Sep 1, 2025

Copy link
Copy Markdown
Contributor Author

so yes, the added value for me is to not need to worry about creation of a pyproject.toml by hand.
(but a 'uv init' takes care of this as well)

and that it can as well "sync" the python version used

@behrica

behrica commented Sep 14, 2025

Copy link
Copy Markdown
Contributor Author

The alternative to "changing/creating/overwriting" an existing pyproject.toml is to leave it to the user to add his python dependencies into it.

Then the only thing we do in clojure would be to call (shell/sh "uv" "sync"), which questions the need for any clojure code.

@behrica

behrica commented Feb 6, 2026

Copy link
Copy Markdown
Contributor Author

I released this separately:
https://github.com/behrica/libpython-clj-uv

so the PR can be closed

@behrica behrica closed this Feb 6, 2026
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.

2 participants