django-picklefield
django-picklefield copied to clipboard
Package cannot be built from source without installing Django first
On systems where no binary build is available, django-picklefield cannot be installed in a clean virtualenv, because it relies on Django being installed at build time
To reproduce:
$ mkvirtualenv -p python3.8 test-django-picklefield-build
$ workon test-django-picklefield-build
$ pip install --no-binary django-picklefield django-picklefield
Collecting django-picklefield
Using cached django-picklefield-3.0.1.tar.gz (9.5 kB)
ERROR: Command errored out with exit status 1:
command: /Users/niklas/.virtualenvs/test-django-picklefield/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/zy/5k15xt89127ck1l3sk615l5m0000gn/T/pip-install-7k5uva3e/django-picklefield/setup.py'"'"'; __file__='"'"'/private/var/folders/zy/5k15xt89127ck1l3sk615l5m0000gn/T/pip-install-7k5uva3e/django-picklefield/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /private/var/folders/zy/5k15xt89127ck1l3sk615l5m0000gn/T/pip-pip-egg-info-m4z3m_ay
cwd: /private/var/folders/zy/5k15xt89127ck1l3sk615l5m0000gn/T/pip-install-7k5uva3e/django-picklefield/
Complete output (7 lines):
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/private/var/folders/zy/5k15xt89127ck1l3sk615l5m0000gn/T/pip-install-7k5uva3e/django-picklefield/setup.py", line 5, in <module>
import picklefield
File "/private/var/folders/zy/5k15xt89127ck1l3sk615l5m0000gn/T/pip-install-7k5uva3e/django-picklefield/picklefield/__init__.py", line 3, in <module>
import django.utils.version
ModuleNotFoundError: No module named 'django'
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
The obvious fix is to maintain the version differently, e.g. https://github.com/niklasb/django-picklefield/commit/dc2979840cdb0862ac22ca4b0ab3dc41684720f3