Skip to content

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

Closed

Description

@nichtmacho

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 = "[email protected]: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" }

Activity

  1. baszalmstra commented on Feb 28, 2024

    @baszalmstra
    Contributor

    I like it!

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

  2. pavelzw commented on Mar 14, 2024

    @pavelzw
    Collaborator

    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

  3. olivier-lacroix commented on Mar 18, 2024

    @olivier-lacroix
    Contributor

    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

  4. ruben-arts commented on Apr 4, 2024

    @ruben-arts
    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

Metadata

Metadata

Assignees

Labels

enhancementpypi

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions