django-xxx / django-admin

Django Admin Extensions
https://pypi.org/project/django-admin/
4 stars 3 forks source link

Can't install Django-admin because of problem with one of dependences #3

Open MrClon opened 4 months ago

MrClon commented 4 months ago

Looks like problem with screen package which required by excel-base, which required by django-excel-response2, which required by Django-admin

Python 3.13.3, pip 24.0, GCC 14.1.1

$ python -m venv ./delme
$ ./delme/bin/pip install Django-admin
Collecting Django-admin
  Using cached django_admin-2.0.2-py2.py3-none-any.whl.metadata (3.7 kB)
Collecting django-excel-response2>=3.0.0 (from Django-admin)
  Using cached django_excel_response2-3.0.6-py2.py3-none-any.whl.metadata (4.0 kB)
Collecting django-six (from Django-admin)
  Using cached django_six-1.0.5-py2.py3-none-any.whl.metadata (794 bytes)
Collecting excel-base>=1.0.3 (from django-excel-response2>=3.0.0->Django-admin)
  Using cached excel_base-1.0.4-py2.py3-none-any.whl.metadata (1.1 kB)
Collecting xlwt (from excel-base>=1.0.3->django-excel-response2>=3.0.0->Django-admin)
  Using cached xlwt-1.3.0-py2.py3-none-any.whl.metadata (3.5 kB)
Collecting screen (from excel-base>=1.0.3->django-excel-response2>=3.0.0->Django-admin)
  Using cached screen-1.0.1.tar.gz (8.6 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Installing backend dependencies ... done
  Preparing metadata (pyproject.toml) ... done
Collecting TimeConvert>=1.5.3 (from excel-base>=1.0.3->django-excel-response2>=3.0.0->Django-admin)
  Using cached TimeConvert-3.0.13-py2.py3-none-any.whl.metadata (1.8 kB)
Collecting isoweek (from TimeConvert>=1.5.3->excel-base>=1.0.3->django-excel-response2>=3.0.0->Django-admin)
  Using cached isoweek-1.3.3-py2.py3-none-any.whl.metadata (4.4 kB)
Collecting python-dateutil>=2.8.1 (from TimeConvert>=1.5.3->excel-base>=1.0.3->django-excel-response2>=3.0.0->Django-admin)
  Using cached python_dateutil-2.9.0.post0-py2.py3-none-any.whl.metadata (8.4 kB)
Collecting tzlocal (from TimeConvert>=1.5.3->excel-base>=1.0.3->django-excel-response2>=3.0.0->Django-admin)
  Using cached tzlocal-5.2-py3-none-any.whl.metadata (7.8 kB)
Collecting six>=1.5 (from python-dateutil>=2.8.1->TimeConvert>=1.5.3->excel-base>=1.0.3->django-excel-response2>=3.0.0->Django-admin)
  Using cached six-1.16.0-py2.py3-none-any.whl.metadata (1.8 kB)
Using cached django_admin-2.0.2-py2.py3-none-any.whl (7.6 kB)
Using cached django_excel_response2-3.0.6-py2.py3-none-any.whl (4.9 kB)
Using cached django_six-1.0.5-py2.py3-none-any.whl (2.7 kB)
Using cached excel_base-1.0.4-py2.py3-none-any.whl (5.2 kB)
Using cached TimeConvert-3.0.13-py2.py3-none-any.whl (19 kB)
Using cached xlwt-1.3.0-py2.py3-none-any.whl (99 kB)
Using cached python_dateutil-2.9.0.post0-py2.py3-none-any.whl (229 kB)
Using cached isoweek-1.3.3-py2.py3-none-any.whl (7.1 kB)
Using cached tzlocal-5.2-py3-none-any.whl (17 kB)
Using cached six-1.16.0-py2.py3-none-any.whl (11 kB)
Building wheels for collected packages: screen
  Building wheel for screen (pyproject.toml) ... error
  error: subprocess-exited-with-error

  × Building wheel for screen (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [32 lines of output]
      running bdist_wheel
      The [wheel] section is deprecated. Use [bdist_wheel] instead.
      running build
      running build_py
      creating build
      creating build/lib.linux-x86_64-cpython-312
      creating build/lib.linux-x86_64-cpython-312/screen
      copying screen/__init__.py -> build/lib.linux-x86_64-cpython-312/screen
      copying screen/compat.py -> build/lib.linux-x86_64-cpython-312/screen
      copying screen/old_str_util.py -> build/lib.linux-x86_64-cpython-312/screen
      running build_ext
      building 'screen.str_util' extension
      creating build/temp.linux-x86_64-cpython-312
      creating build/temp.linux-x86_64-cpython-312/source
      gcc -fno-strict-overflow -DNDEBUG -g -O3 -Wall -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -g -ffile-prefix-map=/build/python/src=/usr/src/debug/python -flto=auto -ffat-lto-objects -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -g -ffile-prefix-map=/build/python/src=/usr/src/debug/python -flto=auto -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -g -ffile-prefix-map=/build/python/src=/usr/src/debug/python -flto=auto -fPIC -I/mnt/ssd-trash/delme/include -I/usr/include/python3.12 -c source/str_util.c -o build/temp.linux-x86_64-cpython-312/source/str_util.o
      source/str_util.c: In function ‘Py_IsWideChar’:
      source/str_util.c:484:16: error: implicit declaration of function ‘PyUnicode_AS_UNICODE’; did you mean ‘PyUnicode_AsUCS4’? [-Wimplicit-function-declaration]
        484 |         ustr = PyUnicode_AS_UNICODE(text);
            |                ^~~~~~~~~~~~~~~~~~~~
            |                PyUnicode_AsUCS4
      source/str_util.c:484:14: error: assignment to ‘Py_UNICODE *’ {aka ‘int *’} from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
        484 |         ustr = PyUnicode_AS_UNICODE(text);
            |              ^
      source/str_util.c: In function ‘Py_CalcWidth’:
      source/str_util.c:663:14: error: assignment to ‘Py_UNICODE *’ {aka ‘int *’} from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
        663 |         ustr = PyUnicode_AS_UNICODE(text);
            |              ^
      source/str_util.c: In function ‘Py_CalcTextPos’:
      source/str_util.c:755:14: error: assignment to ‘Py_UNICODE *’ {aka ‘int *’} from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
        755 |         ustr = PyUnicode_AS_UNICODE(text);
            |              ^
      error: command '/usr/bin/gcc' failed with exit code 1
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for screen
Failed to build screen
ERROR: Could not build wheels for screen, which is required to install pyproject.toml-based projects
$ python -V
Python 3.12.3
$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-pc-linux-gnu/14.1.1/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: /build/gcc/src/gcc/configure --enable-languages=ada,c,c++,d,fortran,go,lto,m2,objc,obj-c++,rust --enable-bootstrap --prefix=/usr --libdir=/usr/lib --libexecdir=/usr/lib --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=https://gitlab.archlinux.org/archlinux/packaging/packages/gcc/-/issues --with-build-config=bootstrap-lto --with-linker-hash-style=gnu --with-system-zlib --enable-__cxa_atexit --enable-cet=auto --enable-checking=release --enable-clocale=gnu --enable-default-pie --enable-default-ssp --enable-gnu-indirect-function --enable-gnu-unique-object --enable-libstdcxx-backtrace --enable-link-serialization=1 --enable-linker-build-id --enable-lto --enable-multilib --enable-plugin --enable-shared --enable-threads=posix --disable-libssp --disable-libstdcxx-pch --disable-werror
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 14.1.1 20240507 (GCC) 
gdespirito commented 4 months ago

Same here on OSX 14.5 (Sonoma)

python 3.12, poetry 1.8.3

gcc -v
Apple clang version 15.0.0 (clang-1500.3.9.4)
Target: arm64-apple-darwin23.5.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
➜  poetry install
Installing dependencies from lock file

Package operations: 63 installs, 0 updates, 0 removals

  - Installing screen (1.0.1): Failed

  ChefBuildError

  Backend subprocess exited when trying to invoke build_wheel

  running bdist_wheel
  The [wheel] section is deprecated. Use [bdist_wheel] instead.
  running build
  running build_py
  creating build
  creating build/lib.macosx-14.0-arm64-cpython-312
  creating build/lib.macosx-14.0-arm64-cpython-312/screen
  copying screen/old_str_util.py -> build/lib.macosx-14.0-arm64-cpython-312/screen
  copying screen/compat.py -> build/lib.macosx-14.0-arm64-cpython-312/screen
  copying screen/__init__.py -> build/lib.macosx-14.0-arm64-cpython-312/screen
  running build_ext
  building 'screen.str_util' extension
  creating build/temp.macosx-14.0-arm64-cpython-312
  creating build/temp.macosx-14.0-arm64-cpython-312/source
  clang -fno-strict-overflow -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -O3 -Wall -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk -I/private/var/folders/xt/1kj60tqd4p38zv53gvkt0q040000gn/T/tmpm0z43jrf/.venv/include -I/opt/homebrew/opt/python@3.12/Frameworks/Python.framework/Versions/3.12/include/python3.12 -c source/str_util.c -o build/temp.macosx-14.0-arm64-cpython-312/source/str_util.o
  source/str_util.c:484:16: error: call to undeclared function 'PyUnicode_AS_UNICODE'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
          ustr = PyUnicode_AS_UNICODE(text);
                 ^
  source/str_util.c:484:14: error: incompatible integer to pointer conversion assigning to 'Py_UNICODE *' (aka 'int *') from 'int' [-Wint-conversion]
          ustr = PyUnicode_AS_UNICODE(text);
               ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~
  source/str_util.c:663:16: error: call to undeclared function 'PyUnicode_AS_UNICODE'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
          ustr = PyUnicode_AS_UNICODE(text);
                 ^
  source/str_util.c:663:14: error: incompatible integer to pointer conversion assigning to 'Py_UNICODE *' (aka 'int *') from 'int' [-Wint-conversion]
          ustr = PyUnicode_AS_UNICODE(text);
               ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~
  source/str_util.c:755:16: error: call to undeclared function 'PyUnicode_AS_UNICODE'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
          ustr = PyUnicode_AS_UNICODE(text);
                 ^
  source/str_util.c:755:14: error: incompatible integer to pointer conversion assigning to 'Py_UNICODE *' (aka 'int *') from 'int' [-Wint-conversion]
          ustr = PyUnicode_AS_UNICODE(text);
               ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~
  6 errors generated.
  error: command '/usr/bin/clang' failed with exit code 1

  at /opt/homebrew/Cellar/poetry/1.8.3/libexec/lib/python3.12/site-packages/poetry/installation/chef.py:164 in _prepare
      160│
      161│                 error = ChefBuildError("\n\n".join(message_parts))
      162│
      163│             if error is not None:
    → 164│                 raise error from None
      165│
      166│             return path
      167│
      168│     def _prepare_sdist(self, archive: Path, destination: Path | None = None) -> Path:

Note: This error originates from the build backend, and is likely not a problem with poetry but with screen (1.0.1) not supporting PEP 517 builds. You can verify this by running 'pip wheel --no-cache-dir --use-pep517 "screen (==1.0.1)"'.