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

Impossible to add a pypi git dependency in a clean environment #2588

Open
2 tasks done
akhmerov opened this issue Nov 28, 2024 · 2 comments
Open
2 tasks done

Impossible to add a pypi git dependency in a clean environment #2588

akhmerov opened this issue Nov 28, 2024 · 2 comments

Comments

@akhmerov
Copy link

Checks

  • I have checked that this issue has not already been reported.

  • I have confirmed this bug exists on the latest version of pixi, using pixi --version.

Reproducible example

[project]
authors = ["Anton Akhmerov"]
channels = ["conda-forge"]
description = "Can't boostrap pypi git dependency"
name = "pixi_bug"
platforms = ["linux-64"]
version = "0.1.0"

[tasks]

[dependencies]
python = ">=3.13.0,<3.14"
git = ">=2.47.1,<3"

[pypi-dependencies]
skunk = { git = "https://github.com/akhmerov/skunk.git" }

Issue description

It is impossible to install a git dependency in a pixi environment without git even if git is available via pixi itself.

Expected behavior

Pixi should be able to use git to install pypi dependencies from git sources just like it uses python.

@synapticarbors
Copy link
Contributor

I don't have a clean environment to fully test this on, but I think (assuming aliasing git to no-op on my machine worked), you can change your manifest to:

....
[host-dependencies]
git = ">=2.47.1,<3"

[dependencies]
python = ">=3.13.0,<3.14"

[pypi-dependencies]
skunk = { git = "https://github.com/akhmerov/skunk.git" }

See:
https://pixi.sh/latest/reference/project_configuration/#host-dependencies

@synapticarbors
Copy link
Contributor

I was able to get a isolated linux vm with no git available, and I was wrong. I get the same error if git is in dependencies, host-dependencies or build-dependencies. On my laptop, it seems like it was find a system git install even though I thought they had all been disabled:

DEBUG resolve_pypi{group=default platform=linux-aarch64}:get_or_build_wheel_metadata{dist=skunk @ git+https://github.com/akhmerov/skunk.git}: uv_fs: Released lock at `/home/xyz/.cache/rattler/cache/uv-cache/git-v0/locks/85701ea07cc9e8c7`
  × failed to solve the pypi requirements of 'default' 'linux-aarch64'
  ├─▶ Failed to download and build: `skunk @ git+https://github.com/akhmerov/skunk.git`
  ├─▶ Git operation failed
  ╰─▶ cannot find binary path

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

No branches or pull requests

2 participants