Library implementing common processes and logging for buildsystems
Project description
python-build-tools
A toolkit containing many powerful utilities, including:
- OS utilities (buildtools.os_utils)
- Indented logging with colorama support (buildtools.bt_logging.log)
- The powerful Maestro build management system (buildtools.maestro)
- A powerful VCS repository wrapper system (buildtools.repo)
- A mess of other random things.
Maestro
from buildtools.maestro import BuildMaestro
from buildtools.maestro.fileio import ReplaceTextTarget
from buildtools.maestro.coffeescript import CoffeeBuildTarget
from buildtools.maestro.web import SCSSBuildTarget, SCSSConvertTarget
bm = BuildMaestro()
# Compile CoffeeScript to JS
bm.add(CoffeeBuildTarget('htdocs/js/vgws.js', ['coffee/src/vgws.coffee']))
bm.add(CoffeeBuildTarget('htdocs/js/editpoll.multichoice.js', ['coffee/editpoll.multichoice.coffee'], dependencies=['htdocs/js/vgws.js']))
bm.add(CoffeeBuildTarget('htdocs/js/editpoll.option.js', ['coffee/editpoll.editpoll.coffee'], dependencies=['htdocs/js/vgws.js']))
# Convert CSS to SCSS
bm.add(SCSSBuildTarget('htdocs/css/style.css', ['style/style.scss'], [], import_paths=['style'], compass=True))
### PMK FILES
# Tell Maestro what target types to recognize
bm.RecognizeType(SCSSBuildTarget)
bm.RecognizeType(SCSSConvertTarget)
bm.RecognizeType(CoffeeBuildTarget)
bm.RecognizeType(ReplaceTextTarget)
# Save previously-made rules to disk.
bm.saveRules('Makefile.pmk')
# Load previously-made rules.
bm.loadRules('Makefile.pmk')
### COMPILE
# Sort all targets by dependency
bm.run()
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pybuildtools-0.3.0.tar.gz
(66.8 kB
view hashes)
Built Distribution
pybuildtools-0.3.0-py3-none-any.whl
(119.6 kB
view hashes)
Close
Hashes for pybuildtools-0.3.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 94eb0a71652c34effac8921343bd068260adbdd1e2ed65a487424a77ab0efc1b |
|
MD5 | 985b509ea702a5c0c96f2cf06caaca9e |
|
BLAKE2b-256 | b214e3d15b465c34666ddfda9ebef94b32ef9fe807b5204fca1fc0b370771214 |