henon / Python.Included

A Python.NET based framework enabling .NET libraries to call into Python packages without depending on a local Python installation.
MIT License
313 stars 51 forks source link

Suboptimal behavior: handling of packages with non-standard name #15

Closed katjoek closed 3 years ago

katjoek commented 3 years ago

Package python-dateutils has a wheel file that does not unzip to python-dateutils but to dateutils. The Python.Included code looks to see if the package directory (with default name) is present and if it is, it will not unzip the wheel file. In this case the file is unzipped because it does not find the python-dateutils directory. The directory dateutils directory does already exist on 2nd execution which causes an exception to be throw. The exception is eaten. It would be better if the non-standard name was detected somehow and the unzip was only done in case the embedded directory does not exist yet.

katjoek commented 3 years ago

The six wheel as a similar issue. It unpacks a six.py file into the root of Lib... That file is not in a subdirectory.