A pure-Python makefile parser and executor.
Project description
AlmostMake
A pure-python, not-quite-POSIX-compliant implementation of make.
Usage
AlmostMake installs the almake
command-line utility.
Running almake
in a directory with a file named Makefile
causes almake
to satisfy the first target defined in that file.
For example, say Makefile
contains the following:
# A makefile!
# This is the first target.
# (Pretend `echo 'Hello, world'`
# is indented with a single tab)
firstTarget:
echo 'Hello, world'
# firstTarget isn't the name of a real file!
# Mark it as PHONY. We need this because if
# firstTarget were to be a file in the same
# folder as Makefile, its existence (and lack
# of newer dependencies) would cause `almake`
# to do nothing!
.PHONY: firstTarget
almake
then runs the commands associated with firstTarget. Each line is given its own shell.
almake
also makes available the almost_make
module! Documentation on this is coming, but for now, check out the source on GitHub!
In addition to the almake
command, the almake_shell
command is available. This command gives access to an interactive version of the (very limited) shell built into AlmostMake. See almake --help
and almake_shell --help
for more information.
Installation
From PyPI...
AlmostMake is on the Python Package Index! To install it, run:
$ python3 -m pip install almost-make
To update it,
$ python3 -m pip install --upgrade almost-make
From GitHub...
As AlmostMake
is hosted on GitHub, it can be installed by cloning:
$ git clone https://github.com/personalizedrefrigerator/AlmostMake.git
$ cd AlmostMake
$ make install
You may also need to install setuptools
, wheel
, and twine
. See Packaging Python Projects for a brief overview of these packages. They can be installed as follows:
$ python3 -m pip install --user --upgrade setuptools wheel twine
Testing
To test AlmostMake, run,
$ make test
Note, however, that make test
depends on make install
!
At present, it has only been tested on Debian and Ubuntu with Python 3.7 and 3.8. It may work with other operating systems and Python versions, but this is not guaranteed.
If you find that AlmostMake works on a platform not listed here, post an issue or comment on this project's GitHub repository! Pull requests and feedback are welcome!
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
Built Distribution
Hashes for almost_make-0.0.13-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0ca53897e805355df0211473a12a5b83de8f45061caf6be06b7253ec47f030a6 |
|
MD5 | 6b431e1e4eb762fc48be3546e092224a |
|
BLAKE2b-256 | 66b35868f78b87c06f0d98aa6e8d42e404bbfab8337f982c04f0253195d43d92 |