pixi icon indicating copy to clipboard operation
pixi copied to clipboard

[Bug] Error when adding Git repos

Open T145 opened this issue 1 year ago • 4 comments

Checks

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

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

Reproducible example

PS C:\Users\anon\Desktop\aida> pixi add --pypi llm-reader@git+https://github.com/m92vyas/llm-reader.git
  × failed to solve the pypi requirements of 'default' 'win-64'
  ├─▶ Failed to download and build `llm-reader @ git+https://github.com/m92vyas/llm-reader.git`
  ╰─▶ Build backend failed to determine requirements with `build_wheel()` (exit code: 1)
      
      [stderr]
      Traceback (most recent call last):
        File "<string>", line 8, in <module>
        File "C:\Users\anon\AppData\Local\rattler\cache\uv-cache\builds-v0\.tmpFgn78P\Lib\site-packages\setuptools\__init__.py", line 27, in <module>
          from .dist import Distribution
        File "<frozen importlib._bootstrap>", line 1360, in _find_and_load
        File "<frozen importlib._bootstrap>", line 1331, in _find_and_load_unlocked
        File "<frozen importlib._bootstrap>", line 935, in _load_unlocked
        File "C:\Users\anon\AppData\Local\rattler\cache\uv-cache\builds-v0\.tmpFgn78P\Lib\site-packages\_virtualenv.py", line 89, in exec_module
          old(module)
        File "C:\Users\anon\AppData\Local\rattler\cache\uv-cache\builds-v0\.tmpFgn78P\Lib\site-packages\setuptools\dist.py", line 27, in <module>
          from .config import pyprojecttoml, setupcfg
      SyntaxError: source code string cannot contain null bytes

Issue description

This never happened before updating to the latest Pixi version, but now Git repos break.

Expected behavior

The Git repo is added and built successfully as on older versions.

T145 avatar Dec 18 '24 20:12 T145

@nichmor would you be able to take a look at this, as you have working on our other git work?

ruben-arts avatar Dec 20 '24 16:12 ruben-arts

hey @T145! thanks for reporting this!

I tried to reproduce it on osx-arm64, and unfortunately it works for me.

I've asked my colegue @ruben-arts to try it on windows machine ( as I see from your logs you are using it for win ). will return with details

nichtmacho avatar Dec 24 '24 09:12 nichtmacho

Hey, I just tried. This works for me on win-64 too:

[project]
channels = ["conda-forge"]
name = "llm-reader"
platforms = ["win-64"]
version = "0.1.0"

[dependencies]
python = "==3.12"

[pypi-dependencies]
llm-reader = { git = "https://github.com/m92vyas/llm-reader.git" }

Maybe you've got a corrupted cache. Running a pixi clean cache --pypi might help.

ruben-arts avatar Dec 24 '24 09:12 ruben-arts

Closing as stale

ruben-arts avatar Jan 10 '25 08:01 ruben-arts