shinneider / django-admin-inline-paginator

MIT License
128 stars 21 forks source link

Pip fails to install in hash-checking mode #23

Closed kemar closed 2 years ago

kemar commented 2 years ago

Hi,

I'm facing an issue where pip fails to install django-admin-inline-paginator in hash-checking mode.

Maybe you have an idea or a quick solution?

Minimal case to reproduce the issue:

With:

requirements.txt:

asgiref==3.4.1 \
    --hash=sha256:4ef1ab46b484e3c706329cedeff284a5d40824200638503f5768edb6de7d58e9 \
    --hash=sha256:ffc141aa908e6f175673e7b1b3b7af4fdb0ecb738fc5c8b88f69f055c2415214
django==3.2.13 \
    --hash=sha256:6d93497a0a9bf6ba0e0b1a29cccdc40efbfc76297255b1309b3a884a688ec4b6 \
    --hash=sha256:b896ca61edc079eb6bbaa15cf6071eb69d6aac08cce5211583cfb41515644fdf
django-admin-inline-paginator==0.3.0 \
    --hash=sha256:283e701db35064b9a2afb5675f3c59f0c8f57059364471f61638d835fe17218b
pytz==2020.1 \
    --hash=sha256:a494d53b6d39c3c6e44c3bec237336e14305e4f29bbf800b599253057fbb79ed \
    --hash=sha256:c35965d010ce31b23eeb663ed3cc8c906275d6be1a34393a1d73a41febf4a048
sqlparse==0.3.1 \
    --hash=sha256:022fb9c87b524d1f7862b3037e541f68597a730a8843245c349fc93e1643dc4e \
    --hash=sha256:e162203737712307dfe78860cc56c8da8a852ab2ee33750e33aeadf38d12c548

pip output:

pip install -r `requirements.txt`
Collecting asgiref==3.4.1
  Using cached asgiref-3.4.1-py3-none-any.whl (25 kB)
Collecting django==3.2.13
  Using cached Django-3.2.13-py3-none-any.whl (7.9 MB)
Collecting django-admin-inline-paginator==0.3.0
  Using cached django-admin-inline-paginator-0.3.0.tar.gz (7.4 kB)
  Preparing metadata (setup.py) ... error
  error: subprocess-exited-with-error

  × python setup.py egg_info did not run successfully.
  │ exit code: 1
  ╰─> [8 lines of output]
      Traceback (most recent call last):
        File "<string>", line 2, in <module>
        File "<pip-setuptools-caller>", line 34, in <module>
        File "/private/var/folders/rc/xpcnx4g944ndf9c6cxj4d2t40000gn/T/pip-install-5swp0uqi/django-admin-inline-paginator_10bc51bb78384473a30b3d4702a8aece/setup.py", line 7, in <module>
          from django_admin_inline_paginator import __version__
        File "/private/var/folders/rc/xpcnx4g944ndf9c6cxj4d2t40000gn/T/pip-install-5swp0uqi/django-admin-inline-paginator_10bc51bb78384473a30b3d4702a8aece/django_admin_inline_paginator/__init__.py", line 5, in <module>
          if django.VERSION < (3, 2):  # pragma: no cover
      AttributeError: module 'django' has no attribute 'VERSION'
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.
make: *** [install] Error 1
kemar commented 2 years ago

I'm closing this because I can't reproduce that bug with a clean venv. This may be related with a pyenv setup…

Sorry for the noise.