ibmdb / python-ibmdb-django

IBM DB2 Driver for the Django application Framework
Apache License 2.0
29 stars 42 forks source link

`django>=3.2.*` Version spec issue when installing ibm-db-django #82

Closed 2kays closed 1 year ago

2kays commented 1 year ago

Hi, I get the following error when trying to install ibm-db-django 1.5.2.0 via Poetry on Linux.

The complaint from Poetry appears to be that the django>=3.2.* version spec in settings.py's install_requires is syntactically invalid. Should it be something like django>=3.2 or django>=3.2.0 ?



• Installing ibm-db-django (1.5.2.0): Failed
  CalledProcessError
  [...]
The following error occurred when trying to handle this error:
  EnvCommandError
  Command ['/usr/local/bin/python3.10', '-m', 'pip', 'install', '--use-pep517', '--disable-pip-version-check', '--isolated', '--no-input', '--prefix', '/usr/local', '--no-deps', '/root/.cache/pypoetry/artifacts/f4/dd/ab/d04f1edc7dfb538dcaad78c3be2681fb735bcb7f98a11fd53df49c0cce/ibm_db_django-1.5.2.0.tar.gz'] errored with the following return code 1, and output:
  Processing /root/.cache/pypoetry/artifacts/f4/dd/ab/d04f1edc7dfb538dcaad78c3be2681fb735bcb7f98a11fd53df49c0cce/ibm_db_django-1.5.2.0.tar.gz
    Installing build dependencies: started
    Installing build dependencies: finished with status 'done'
    Getting requirements to build wheel: started
    Getting requirements to build wheel: finished with status 'error'
    error: subprocess-exited-with-error
    × Getting requirements to build wheel did not run successfully.
    │ exit code: 1
    ╰─> [3 lines of output]
        error in ibm_db_django setup command: 'install_requires' must be a string or list of strings containing valid project/version requirement specifiers; Expected end or semicolon (after version specifier)
            django>=3.2.*
                  ~~~~~^
        [end of output]
    note: This error originates from a subprocess, and is likely not a problem with pip.
  error: subprocess-exited-with-error```
praveen-db2 commented 1 year ago

@2kays we didnt face any issue with this syntax, anyhow as workaround you can install django manually before tyring to install ibm-db-django so setup.py skips installing django. In fee days I ill try fixing this issue.

2kays commented 1 year ago

I forked this morning and repointed Poetry at my fork. My build works with the change here: https://github.com/2kays/python-ibmdb-django/commit/3176d43f3c42383d8648cb7a339f026b60c7e53f

praveen-db2 commented 1 year ago

@2kays please continue, I ill fix it when I start working on to support Django 4.x

0x2ec commented 1 year ago

I just ran into this: The issue is newer versions of setuptools, I believe. Locally, I have 62.6.0, but in CI we have 67.3.1 (and updating to 67.7.2 did not resolve the issue).

0x2ec commented 1 year ago

@2kays I implemented my own fix before clicking on the link to your fix - I guess we agree :D

florisjkruger4 commented 1 year ago

I think it has to do with the Python version you are using. It should be Python 3.10

praveen-db2 commented 1 year ago

Closing this as we addressed this , will be releasing new release shortly.