ariovistus / pyd

Interoperability between Python and D
MIT License
158 stars 32 forks source link

64-bit pyd dub packages on Windows #76

Closed atilaneves closed 6 years ago

atilaneves commented 6 years ago

Currently there's no way to create a dub.sdl/dub.json file with a dependency on pyd and have it build on Windows with dub build --arch=x86_64. This is because pyd's dub.json links to the optlink-compatible python .lib files independently of architecture.

This PR makes it so that it's possible to build on Windows and generate a 64-bit DLL.

thedeemon commented 6 years ago

This PR expects to find Python libs at a path like C:\Users\$USERNAME\AppData\Local\Programs\Python\Python36\libs however the default installation of Python lives in Program Files, so in my case the right path was "C:\Program Files\Python36\libs" Only after copying the lib files to the folder mentioned in this patch I could build the example with dub.

atilaneves commented 6 years ago

@thedeemon I've installed Python on a number of Windows machines in the last 6 months and the default location in the installer was C:\Users\$USERNAME\AppData\Local\Programs\Python\Python36\libs. I was surprised it didn't go into Program Files.