arbor
arbor copied to clipboard
pip installable arbor catalogues (`build-catalogue` extension)
A flag could be added to the build-catalogue script so that build-catalogue --python-pkg instead of a shared library produces a source distribution whose install produces:
- A shared library object built against the target machine's arbor library containing the catalogue.
- An importable code module that executes
arbor.load_library("artifact.so")
To further support pip installable catalogues arbor's Python interface could load all modules that announce themselves with a pkg_resources entry point like arbor.catalogue. (To auto load all installed catalogues)
The basic workflow would be:
- Generate a build folder with a template Python package in it
- Collect the mod files and place them in the template
- Fill out the deets in the template
setup.py setup.pyshould:- Override the install command to
build-catalogue - Contain instructions for the module/entry-point
- Override the install command to
- Run the
python setup.py sdistcommand - Remove the builder folder
Maybe all of this warrants build-catalogue to become its own tool to help users manage, make and distribute their catalogues. arbcat build, arbcat list, ... looks sexy ;p