[Distutils] Towards a simple and standard sdist format that isn't intertwined with distutils

Nathaniel Smith njs at pobox.com
Fri Oct 2 22:27:49 CEST 2015


On Fri, Oct 2, 2015 at 1:24 PM, Daniel Holth <dholth at gmail.com> wrote:
> Instead of multiple hooks why not a single object exposed through an entry
> point that has several optional methods?
>
> NO
>
>     [build]
>     requirements = "flit"
>     build-wheels = "flit.pypackage_hooks:build_wheels"
>     build-in-place = "flit.pypackage_hooks:build_in_place"
>
> YES
>
> [build]
> build-system=flit
>
> class ABuildHook:
>     def build_wheels(self): ...
>
> entry_points = {'new.sdist.build.hooks': ['flit= some_module:ABuildHook']}

Mostly because this rules out the possibility of shipping the build
hook inside the package being built, which seems like a useful option
to leave open (e.g. some people will probably want to vendor their
build system for more-or-less legitimate reasons). Notice that the
_pypackage directory is added to sys.path before resolving hooks.

-n

-- 
Nathaniel J. Smith -- http://vorpus.org


More information about the Distutils-SIG mailing list