user • Different users require different workflows: not just tarballs ! • allow for creating binary installers • integrating with native systems (.deb, .rpm, etc...) Saturday, 9 June 12
support • creating new commands (test, build doc, etc...) • Anything related to compilation is hard and fragile • Extensions based on monkey- patching Saturday, 9 June 12
(fortran, etc...) • Numerous issues when setuptools appeared (monkey patching overrides, etc...) • Poor code quality, e.g.: • attributes added at runtime in some conditions • lack of common interfaces between compiler classes • Numscons: tentative to integrate scons and distutils Saturday, 9 June 12
a library from the ground up: • low coupling of commands • no global state • Scale down and up: simpler for simple packages, more flexible for bigger ones Saturday, 9 June 12
bentomaker convert • Works for packages using distutils, setuptools, etc... • bentomaker may be distributed as a single file to avoid extra dependencies Saturday, 9 June 12
# setup.py import setuptools import bento.distutils bento.distutils.monkey_patch() # Grab metadata from bento.info setuptools.setup() Those 4 lines of code allow the package to be pip- installable Saturday, 9 June 12
with code, e.g. new command $ bentomaker hello hello from bento.commands import hooks @hooks.command def hello(context): print "Hello" • Hooks are pure python without any ‘magic’ mechanism Saturday, 9 June 12
customise things: • customise compilation flags, conditionally do things, etc... • bento written to be highly customised (integration with 3rd party tools to build C extensions, etc...) Saturday, 9 June 12
Doe MetaTemplateFile: foo/__info.py.in # foo/__info.py.in template content version = $VERSION author = $AUTHOR Allow for a package to know its own metadata: Saturday, 9 June 12
heavily customise some aspects of the build process • currently 3 pluggable backends (default, waf and ‘distutils’ mode) • code for a backend is relatively small (few 100 LOC) • Example Saturday, 9 June 12
configure fine tuning (e.g. 3rd library location) • all options available from any command • Simple mechanism to retrieve resources (no more pkg_resources non-sense) • More to come Saturday, 9 June 12
ground up • no global variable or implicitly passed state • commands are not coupled with each other: • dependencies declared outside the commands • install and binary installers driven by a build manifest (json file) • options can be added outside commands Saturday, 9 June 12
(msi support, etc...) • Improve parser (faster and more reliable) • bentoya (aka bentoshop): pypi-like service + local db of installed packages: • uninstall support • apt-get-like features Saturday, 9 June 12