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

Add support of source dependencies ( direct references of dependency ) #879

Closed
nichmor opened this issue Feb 28, 2024 · 4 comments
Closed
Assignees
Labels
🐍 pypi Issue related to PyPI dependencies ✨ enhancement Feature request

Comments

@nichmor
Copy link
Contributor

nichmor commented Feb 28, 2024

Problem description

This feature aim to allow to specify source dependencies ( direct reference of a dependency) in pixi.toml

this is how pixi.toml will look like

[pypi-dependencies]
# relative path
numpy = {path = "../numpy_repo"}
# editable install of relative path
numpy = {path = "../numpy_repo", editable = true}

# URLs
tensorflow = {url = "https://mytensorflow.com/tf.tar.gz" }

# reference by branch
boltons = {git = "https://github.com/mahmoud/boltons" ,   branch = "next"}
# reference by rev
boltons = {git = "https://github.com/mahmoud/boltons" ,   rev = "38eb5d3b"}
# reference by tag
boltons = {git = "https://github.com/mahmoud/boltons" ,   tag = "v0.13.2"}
# using subdirectory
boltons = {git = "https://github.com/mahmoud/boltons" ,   subdirectory = "subdir"}
# by ssh
requests = { git = "git@github.com:requests/requests.git" }

CLI commands

also we will extend pixi add command:

pixi add https://github.com/mahmoud/boltons/archive/refs/tags/23.0.0.tar.gz

which should produce this in pixi.toml

[pypi-dependencies]
boltons = {url = "https://github.com/mahmoud/boltons/archive/refs/tags/23.0.0.tar.gz" }
@nichmor nichmor added the ✨ enhancement Feature request label Feb 28, 2024
@baszalmstra
Copy link
Contributor

I like it!

Did you also think avout what it would look like in the lock file?

@pavelzw
Copy link
Contributor

pavelzw commented Mar 14, 2024

We could also let pixi print a warning if it detects python packages (or even arbitrary files?) that were not installed via pixi but for example via pip to make sure that the environment was touched only by pixi.

i.e. make #507 print a warning

@olivier-lacroix
Copy link
Contributor

olivier-lacroix commented Mar 18, 2024

I know it’s not as “pretty”, but why not have pypi-dependencies follow pep508? This way, they could directly be handed to uv, and could be copied & pasted from existing pyproject.toml

@ruben-arts
Copy link
Contributor

Currently this is in the latest release, except for the pixi add command allowing you to add more source dependencies. Which is now it's own separate issue #1078

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐍 pypi Issue related to PyPI dependencies ✨ enhancement Feature request
Projects
None yet
Development

No branches or pull requests

6 participants