mkleehammer / pyodbc

Python ODBC bridge
https://github.com/mkleehammer/pyodbc/wiki
MIT No Attribution
2.88k stars 562 forks source link

Invalid PEP-440 characters on local install #1202

Closed ndmlny-qs closed 9 months ago

ndmlny-qs commented 1 year ago

Please first make sure you have looked at:

Environment

To diagnose, we usually need to know the following, including version numbers. On Windows, be sure to specify 32-bit Python or 64-bit:

Issue

expected behavior

Running

pip install --force-reinstall --editable .

should install pyodbc.

observed behavior

Cloning the repo and checking out a tag in a new branch as follows

git clone https://github.com/mkleehammer/pyodbc
cd pyodbc
git fetch --all --tags
git checkout -b 4.0.39 tags/4.0.39
pip install --force-reinstall --editable .

ends with the following error:

              ###################
              # Invalid version #
              ###################
              '4.0.39-heads/4.0.39' is not valid according to PEP 440.

              Please make sure specify a valid version for your package.
              Also note that future releases of setuptools may halt the build process
              if an invalid version is given.

The is due to invalid PEP-440 (https://peps.python.org/pep-0440) characters being used in the local install from a checking out a branch from a tag.

ndmlny-qs commented 9 months ago

closing as this is not longer an issue in the 5.0.0b4 tag