mdavidsaver / setuptools_dso

setuptools extension for building non-Python Dynamic Shared Objects
Other
9 stars 6 forks source link

Allow to customize build_ext #5

Closed navytux closed 4 years ago

navytux commented 4 years ago

Currently setuptools_dso hardcodes its own build_ext class to be used inside setup(). But projects sometimrs need to amend build_ext behaviour - see e.g. here for examples:

https://lab.nexedi.com/nexedi/wendelin.core/blob/b26ba558/setup.py#L147-153 https://lab.nexedi.com/kirr/pygolang/commit/7ae8c4f3 https://lab.nexedi.com/kirr/pygolang/commit/b4feee6f

it would be good if there would be some way to override used build_ext without playing dirty games of monkey-patching setuptools_dso module:

https://lab.nexedi.com/kirr/pygolang/blob/b4feee6f/golang/pyx/build.py#L113-120

Thanks beforehand, Kirill

mdavidsaver commented 4 years ago

How about this 67d717a6de16deef501e53ce7a033ef69c223125 ?

navytux commented 4 years ago

@mdavidsaver thanks for feedback and the patch. To me it is a step into right direction, but this way it allows to pass e.g. build_ext that does not inherit from setuptools_dso.build_ext at all which will lead to dso-related functionality to break. I thus suggest to consider applying https://github.com/mdavidsaver/setuptools_dso/pull/6 (sorry for if there is any silly mistake - done in a hurry).

mdavidsaver commented 4 years ago

Fair point, and this restriction could be relaxed in future if it proves useful.

navytux commented 4 years ago

Thanks for feedback and for merging. Making 1.3 release is also appreciated.

mdavidsaver commented 4 years ago

The timing works well. I needed a fix for Cython anyway (https://github.com/mdavidsaver/setuptools_dso/commit/b49e171c599a5ab11b20be7ddf9fe3404b1556b8).

navytux commented 4 years ago

Good to hear.