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

Installation on windows 10 fails #41

Open
javier-garcia-tilburg opened this issue Jan 30, 2025 · 0 comments
Open

Installation on windows 10 fails #41

javier-garcia-tilburg opened this issue Jan 30, 2025 · 0 comments

Comments

@javier-garcia-tilburg
Copy link

javier-garcia-tilburg commented Jan 30, 2025

This discussion is a continuation to astral-sh/uv#11099

Installing quadax in windows 10 with pip gives this error

ERROR: Could not install packages due to an OSError: [WinError 123] The filename, directory name, or volume label syntax is incorrect: 'C:\\Users\\user\\<project_path>\\.venv\\*

while installing with uv gives this other error

Resolved 51 packages in 1ms
  × Failed to download `quadax==0.2.5`
  ├─▶ Failed to extract archive
  ╰─▶ failed to create directory `C:\Users\user\AppData\Local\uv\cache\.tmpK76oK4\quadax-0.2.5.data/data/*`: The filename, directory name, or volume label syntax is incorrect. (os error 123)
  help: `quadax` (v0.2.5) was included because `dummy` (v0.1.0) depends on `quadax`

The problem seems to affect windows because it doesn't support files with asterisks. Inspecting the file quadax-0.2.5-py3-none.whl reveals that it contains data files

quadax-0.2.5.data/data/_/requirements.txt
quadax-0.2.5.data/data/_/requirements-dev.txt

while quadax-0.2.5.dist-info/RECORD refers to them in the following manner

quadax-0.2.5.data/data/*/requirements-dev.txt,sha256=f5QMec-IahYECs4OvocQWWqO2IXiwWKKNbsD7V6yoTk,556
quadax-0.2.5.data/data/*/requirements.txt,sha256=l4H4ACI11gQsGwguQ2h45GLLxTODDgyu4YbHP9_KUcE,79

Taking a look at the setup.cfg configuration of this project shows that it uses

quadax/setup.cfg

Lines 82 to 84 in 6745cb9

[options.data_files]
* =
*.txt

This configuration is similar to the one proposed by setuptools, except that it's using the deprecated option data_files instead of package_data
https://setuptools.pypa.io/en/latest/userguide/datafiles.html

Also there may be some issues with data_files and asterisks on windows, see pypa/setuptools#1681.

An easy fix may be to just to remove the section options.data_files. The file requirements.txt typically doesn't need to be included inside the package, however it's not 100% clear to me how quadax is packaged.

In particular, this comment indicates a possible reason why data_files was used at some point but setuptools-declarative-requirements doesn't seem to be used anymore

quadax/setup.cfg

Lines 86 to 91 in 6745cb9

[requirements-files]
# setuptools does not support "file:", so use a extra package for this:
# https://pypi.org/project/setuptools-declarative-requirements/
# https://github.com/pypa/setuptools/issues/1951#issuecomment-718094135
install_requires = requirements.txt
setup_requires = requirements-dev.txt

EDIT: I realized that quadax is using the deprecated data_files option instead of package_data. This is quite likely the root of the problem.

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

1 participant