Skip to main content

No project description provided

Project description

iMake

Tests Python Versions Python Whell PyPI PyPI - Implementation Isort Mypy Code style: Black PyPI - Downloads GitHub license


Built with ❤︎ by: William Canin in free time, to the sound of the playlist: Bursting Of The Tympanum


iMake is a command line tool to simplify commands in Python projects, discarding the usability of a Makefile file. As iMake saves on typed commands, passing them a configuration file.

Requirements

To work correctly, you will first need:

  • Python (v3.9 or recent);
  • Pip (v21.0.1 or recent) must be installed;

Installing

$ pip install imake --user

Configuration

The configuration file must exist at the location where imake will be called. The file must be named **.imake **, that is, a file hidden on Unix systems.

To create the file use touch:

$ touch .imake

After creating the file, you should leave it with the following structure. Example:

[build]
commands = ["python setup.py sdist"]

The key with the name commands is an Array and must be mandatory for iMake. In this key you must inform the commands you want to execute using the primary key, in this case, the build.

Option with multiple commands:

[build]
commands = ["rm -rf build", "rm -rf docs/_build;", "python setup.py sdist"]

You can also execute commands in blocks instead of a list, as follows using triple quotes:

[clean]
commands = ["""
            if [[ -d "build" ]]; then
              rm -r build;
            fi
            rm -rf docs/_build;
            rm -rf .pytest_cache;
"""]

iMake settings still have 3 other keys, which are description, header, and footer. All optional.

The key description you must put only a description for a given command. Example:

[build]
description = "This command compiles the project."
commands = ["rm -rf build", "rm -rf docs/_build;", "python setup.py sdist"]

The header key is a message that will appear before the commands start. Example:

[build]
description = "This command compiles the project."
header = "Starting the build ..."
commands = ["rm -rf build", "rm -rf docs/_build;", "python setup.py sdist"]

The footer key is a message that will appear after the commands are finished. Example:

[build]
description = "This command compiles the project."
header = "Starting the build ..."
commands = ["rm -rf build", "rm -rf docs/_build;", "python setup.py sdist"]
footer = "Build command finished!"

Note: The position of the keys does not imply anything, but the values do. The command that you put first in the commands key will be the first to be executed.

Another interesting option is that you can call the execution of a command within another one using imake. Would be like this:

[build]
description = "This command compiles the project."
header = "Starting the build ..."
commands = ["imake clean -q", "python setup.py sdist"]
footer = "Build command finished!"

Notice that the command imake clean -q is inside commands. Where the -q option means to silence verbose mode.

Using

After making the settings in the file .imake, execute the command imake followed by the primary key, which in our example is build. It will look like this:

$ imake build

You can run the help command, imake -h to show which commands are available to you. Any configuration that is in the .imake file will be shown in help, minus the description of each command, which will be shown only if you run the --desc or -d option, for example:

$ imake build --desc 

More Commands

For more command information, use:

$ imake -h

Donation

If you liked my work, buy me a coffee :coffee: :smiley:

paypal

License

The project is available as open source under the terms of the MIT License ©

Credits

See, AUTHORS.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

imake-0.1.0.tar.gz (6.5 kB view details)

Uploaded Source

Built Distribution

imake-0.1.0-py3-none-any.whl (6.8 kB view details)

Uploaded Python 3

File details

Details for the file imake-0.1.0.tar.gz.

File metadata

  • Download URL: imake-0.1.0.tar.gz
  • Upload date:
  • Size: 6.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.6 CPython/3.9.5 Linux/5.12.1-zen2-1-zen

File hashes

Hashes for imake-0.1.0.tar.gz
Algorithm Hash digest
SHA256 7f7a6227aa295c78b6c3848b071b0e96840c141601fad9ee13aaec924ac1cc87
MD5 88b8a0a9874846d732c1bf982571e13e
BLAKE2b-256 8d80a2ee7358b6088f1e1c8f025f0189d103bbdff81c3071cca01d263c78d577

See more details on using hashes here.

File details

Details for the file imake-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: imake-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 6.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.6 CPython/3.9.5 Linux/5.12.1-zen2-1-zen

File hashes

Hashes for imake-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 aa5296be0e07a606ffd67fa7f92017ee0fa87c3a18a5988750e1f59cae7dca17
MD5 51c30866f05492f10c44695ad752a367
BLAKE2b-256 5b8cf42f0b4dd75e8b7011abd83a08dfe61e91f9371a4459ff663c1fc5a5e65b

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page