astral-sh / rye

a Hassle-Free Python Experience
https://rye.astral.sh
MIT License
13.44k stars 460 forks source link

Rye + UV cannot install django-allauth, while UV alone works fine #1190

Open hanerlend opened 2 months ago

hanerlend commented 2 months ago

Steps to Reproduce

This will fail when use-uv = true:

rye init new-project
cd new-project
rye add django-allauth

This will work:

md new-project
cd new-project
uv venv
uv pip install django-allauth

Expected Result

I would expect django-allauth to be installed. For now I use use-uv = false, which is sloow but works.

Actual Result

error: Installation of dependencies failed in venv at \?\C:\Users\sk29433\dev\test\uv-problem.venv. uv exited with status: exit code: 2

Version Info

rye 0.35.0 commit: 0.35.0 (a1dbc56d4 2024-06-24) platform: windows (x86_64) self-python: cpython@3.12.3 symlink support: false uv enabled: true

Stacktrace

No response

duksosleepy commented 1 month ago

I'm also having this problem

yozachar commented 1 week ago

Hi, I'm unable to install django-allauth with rye as well.

> rye add django-allauth 2>&1 > log.txt
Added django-allauth>=64.2.0 as regular dependency
Reusing already existing virtualenv
Generating production lockfile: \\?\C:\project\my_app\requirements.lock
Generating dev lockfile: \\?\C:\project\my_app\requirements-dev.lock
Installing dependencies
rye : Resolved 80 packages in 64ms
At line:1 char:1
+ rye add django-allauth 2>&1 > log.txt
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (Resolved 80 packages in 64ms:String) [], RemoteException
    + FullyQualifiedErrorId : NativeCommandError

error: Failed to prepare distributions
  Caused by: Failed to fetch wheel: django-allauth==64.2.0
  Caused by: Build backend failed to build wheel through `build_wheel()` with exit code: 1
--- stdout:
running bdist_wheel
running build
running build_py
copying allauth\app_settings.py -> build\lib\allauth
copying allauth\conftest.py -> build\lib\allauth

...
...
...

copying allauth\socialaccount\providers\telegram\templates\telegram\callback.html -> 
build\lib\allauth\socialaccount\providers\telegram\templates\telegram
copying allauth\socialaccount\providers\openid\migrations\0001_initial.py -> 
build\lib\allauth\socialaccount\providers\openid\migrations
copying allauth\usersessions\migrations\0001_initial.py -> build\lib\allauth\usersessions\migrations
installing to build\bdist.win-amd64\wheel
running install
running install_lib
copying build\lib\allauth\account\management\commands\account_unsetmultipleprimaryemails.py -> 
build\bdist.win-amd64\wheel\.\allauth\account\management\commands
--- stderr:
C:\Users\yzk\AppData\Local\uv\cache\builds-v0\.tmpmiU42d\lib\site-packages\setuptools\comm
and\build_py.py:218: _Warning: Package 'allauth.locale.ar.LC_MESSAGES' is absent from the `packages` 
configuration.
!!

        ********************************************************************************
        ############################
        # Package would be ignored #
        ############################
        Python recognizes 'allauth.locale.ar.LC_MESSAGES' as an importable package[^1],
        but it is absent from setuptools' `packages` configuration.

        This leads to an ambiguous overall configuration. If you want to distribute this
        package, please make sure that 'allauth.locale.ar.LC_MESSAGES' is explicitly added
        to the `packages` configuration field.

        Alternatively, you can also rely on setuptools' discovery methods
        (for example by using `find_namespace_packages(...)`/`find_namespace:`
        instead of `find_packages(...)`/`find:`).

        You can read more about "package discovery" on setuptools documentation page:

        - https://setuptools.pypa.io/en/latest/userguide/package_discovery.html

        If you don't want 'allauth.locale.ar.LC_MESSAGES' to be distributed and are
        already explicitly excluding 'allauth.locale.ar.LC_MESSAGES' via
        `find_namespace_packages(...)/find_namespace` or `find_packages(...)/find`,
        you can try to use `exclude_package_data`, or `include-package-data=False` in
        combination with a more fine grained `package-data` configuration.

        You can read more about "package data files" on setuptools documentation page:

        - https://setuptools.pypa.io/en/latest/userguide/datafiles.html

        [^1]: For Python, any directory (with suitable naming) can be imported,
              even if it does not contain any `.py` files.
              On the other hand, currently there is no concept of package data
              directory, all directories are treated like packages.
        ********************************************************************************

...
...
...

!!
  check.warn(importable)
error: could not create 
'build\bdist.win-amd64\wheel\.\allauth\account\management\commands\account_unsetmultipleprimaryemails.py': 
No such file or directory
---
error: Installation of dependencies failed in venv at 
\\?\C:\project\my_app\.venv. uv exited with status: exit code: 2

> rye --version
rye 0.39.0
commit: 0.39.0 (bf3ccf818 2024-08-21)
platform: windows (x86_64)
self-python: cpython@3.12.4
symlink support: false
uv enabled: true

Current work around:

> uv pip install django-allauth
> rye sync