Skip to content

cannot mirror uv workspace to pixi workspace when packages depend on one another #22

@cameronraysmith

Description

@cameronraysmith

If we declare a depedence of the root package on a monorepo leaf package in the form that functions as expected for our uv workspace,

[project]
dependencies = [
  "pnt-functional>=0.1.0",
]
name = "python-nix-template"
version = "0.1.0"

...

[tool.uv.sources]
pnt-functional = { workspace = true }

[tool.uv.workspace]
members = ["packages/*"]

the uv package installation and testing functions as expected; however, we cannot lock and install the corresponding pixi workspace. See:

If we declare the pixi dependency among the pypi-dependencies

[tool.pixi.dependencies]
python         = ">=3.11"

[tool.pixi.pypi-dependencies]
pnt-functional = { path = "packages/pnt-functional", editable = true }
python-nix-template = { path = ".", editable = true }

we get

❯ pixi list -v
 INFO pixi_manifest::pyproject: Overriding the requires-python with the one defined in pixi dependencies
Error: 
  × failed to parse project from ~/projects/python-nix-template/pyproject.toml: Unsupported pep508 requirement: 'pnt-functional>=0.1.0'

whereas if we place it among the pixi dependencies

[tool.pixi.dependencies]
pnt-functional = { path = "packages/pnt-functional" }
python         = ">=3.11"

[tool.pixi.pypi-dependencies]
python-nix-template = { path = ".", editable = true }

we get

 INFO pixi::lock_file::update: updated conda packages in the 'default' prefix in 1s 622ms 939us 166ns
 INFO resolve_pypi{group=default platform=osx-arm64}: pixi::lock_file::resolve::pypi: the following python packages are assumed to be installed by conda: expression 5.6.0, typing-extensions 4.12.2, beartype 0.20.0

Error: 
  × failed to solve the pypi requirements of 'default' 'osx-arm64'
  ├─▶ failed to resolve pypi dependencies
  ╰─▶ Because pnt-functional was not found in the package registry and you require pnt-functional>=0.1.0, we can conclude that your requirements are unsatisfiable.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions