A simple command runner disguised as a build system.
Project description
BuildMe 🛠️
Another build system. A simple command runner thats it.
What is BuildMe 🤔️
Well this pretty much sums it up.
Why???
IDK. I saw this comic and decided that I want a build system of my own.
And,
- Makefile's are shit.
- Cmake is complicated
- Meson requires two dependencies (Meson and Ninja)
- Bazel, corporate BS
It does come with some feature.
- It is just command runner (Does not give an f about the file or it's mod time)
- It's just python. Anything that works on python works on buildme script.
- you want a build script that has access to
pandas
, well you can now have it.
- you want a build script that has access to
Docs 🧾️
- Install buildme
pip3 install git+https://github.com/Adwaith-Rajesh/buildme.git
- Create a
buildme
scriptThe shebang is IMPORTANT (This thingy -> #!/bin/env buildme)
#!/bin/env buildme
from argparse import Namespace # for type hinting purposes only
from buildme import CommandRunner
cr = CommandRunner(
shell=False, # prevents invoking 'mystery' programs (default=False)
print_cmd=True, # prints the command that is currently being executed (default=True)
print_cmd_sep=True, # prints a separation line between the commands that are ran (default=True)
exit_non_zero=True, # exit the buildme execution if a command exits non zero (default=True)
)
# you can override the exit_no_zero using the
# method CommandRunner.set_exit_non_zero(vel: bool)
def hello(opts: Namespace):
print(opts)
code = cr.run('echo Hello World')
print(f'{code=}')
def test(opts: Namespace):
if opts.release == '0':
print('release is zero')
print('This from test')
- Make it executable
chmod +x ./buildme
- Have Fun
$ ./buildme hello
Namespace()
================================================================================
[CMD]: echo Hello World
Hello World
================================================================================
code=0
$ ./buildme hello test --release=0
Namespace(release='0')
================================================================================
[CMD]: echo Hello World
Hello World
================================================================================
code=0
release is zero
This from test
Order matters
$ ./buildme test hello --release=0
release is zero
This from test
Namespace(release='0')
================================================================================
[CMD]: echo Hello World
Hello World
================================================================================
code=0
- Helper functions
buildme
has currently two helper functions
from buildme import mkdir, touch
Bye....
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
buildme-0.1.0.tar.gz
(4.3 kB
view hashes)
Built Distribution
Close
Hashes for buildme-0.1.0-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d886612b78bc20cef38a3c9fc6b0ee0d28dd1ff96bd45860d0ce9414e7cbb0f5 |
|
MD5 | 7279ca708ea936c40087ebde76a32afb |
|
BLAKE2b-256 | e167552576517bb5c61ed6cd6b1aaddb6f6a8cf43ddde347f142d8e9cd063b46 |