mkleehammer / pyodbc

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

Location of pyodbc.pyi on install #1266

Closed keitherskine closed 10 months ago

keitherskine commented 10 months ago

The stub file pyodbc.pyi needs special care when generating the wheel, to ensure it is placed in the "site-packages" directory on install. The relevant setup.py code was reverted recently, so I have re-reverted it back. Apparently, we also need to set "include package data" to False now (because it is defaulted to True when using pyproject.toml).

FYI, this code (or at least its equivalent) does not work in pyproject.toml, hence it must remain in setup.py for the time being.

Also, quick fix for MANIFEST.in.

mkleehammer commented 10 months ago

Wow Python packaging is a mess (still!). This is why people like cargo :)

Thanks for catching this.