ariovistus / pyd

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

Changing platform specifier #127

Closed tmarplatt closed 4 years ago

tmarplatt commented 4 years ago

When building/installing via setup.py, how should a user change the platform specifier, as used by build_pyd_embedded_exe()? My intention is to change the build directory name and the filename of the library being built, e.g. change

build/lib.linux-x86_64-3.7/hello.cpython-37m-x86_64-linux-gnu.so

to

build/lib/hello.cpython-37m.so

I tried editing the initializer options parameters in support.py but it doesn't seem to affect the filenames. Also I believe you can change them from the command line? If so, how?

tmarplatt commented 4 years ago

After delving into the distutils source and better understanding how pyd subclasses distutils, I see that build_pyd_embedded_exe is not the class I meant to edit. I possibly need to subclass the 'install' Command and attach it to the arguments passed to base_setup() in support.py.