[Distutils] build system abstraction PEP, take #2
mal at egenix.com
Thu Dec 10 04:28:28 EST 2015
In all this discussion, please don't forget that distutils and
setuptools differentiate between building the code and creating
a distribution file.
The later is not restricted to just the sdist and wheel formats.
distutils can create a wide variety of other distribution formats
such as MSI files, Windows .exe installers, binary in-place
distributions. With extensions it's possible to create the
ActiveState package format, RPMs, DEBs, Solaris PKG files and
other formats such as our eGenix prebuilt format or web
Apart from that it's also possible to have distutils
completely drop the distribution file generation and go
straight to installation after the build step, e.g.
when not using a package manager at all.
IMO, it would be better to use the existing "setup.py build"
and "setup.py bdist_wheel" APIs to create a build system
abstraction, since that'll keep the other existing distribution
methods working in the same context, which is important since
pip is not the only way to distribution Python packages.
The PEP's ideas as well as many other approaches to building
packages can be implemented using a "setup.py build"
and "setup.py bdist_wheel" interface ("bdist_wheel" will
implicitly run "build").
To specifically use the PEP's mechanism, a package could be
created which overrides and implements the PEP's build strategy,
e.g. "pep778build" (assuming the PEP number is 778 as example).
The dependency of a package on this pep778build package
would then signal the compatibility of the package with
the PEP's build mechanism.
In summary: As long as the final result of a call to
"setup.py bdist_wheel" is a .whl file in dist/, pip should be
able to continue working as normal (and as it does today),
regardless of what "setup.py build" does under the hood.
Professional Python Services directly from the Experts (#1, Dec 10 2015)
>>> Python Projects, Coaching and Consulting ... http://www.egenix.com/
>>> Python Database Interfaces ... http://products.egenix.com/
>>> Plone/Zope Database Interfaces ... http://zope.egenix.com/
::: We implement business ideas - efficiently in both time and costs :::
eGenix.com Software, Skills and Services GmbH Pastor-Loeh-Str.48
D-40764 Langenfeld, Germany. CEO Dipl.-Math. Marc-Andre Lemburg
Registered at Amtsgericht Duesseldorf: HRB 46611
More information about the Distutils-SIG