Skip to main content

Make-like build automation tool for Python projects.

Project description

Pyke

(WIP, Beta Release) Make-like build automation tool for Python projects with extensive DSL features.

Features:

  • Users can specify tasks, subtasks, and task rules.
  • Use regex rules patterns to create targets for tasks.
  • Significantly less confusing than Makefiles (is that a tab or space...?)
  • Complete Python DSL with full access to builtins and external dependencies.
  • [WIP] Run and execute tasks in parallel with each other (threaded multitasking).

Example:

import pyke

# create a defualt task, named "build"
@pyke.task("build", default=True)
def build():
    print("Building the project...")

# create a task dependency. running `pyke dist` 
# will make the "build" task run first! 
@pyke.task("dist", deps=["build"])
def dist():
    print("Distributing the project...")

pyke.run()

Put that in a Pykefile and you're good to go. Then run pyke in the same directory and watch the magic happen!

$ pyke dist
Building the project...
Distributing the project...

Installation:

Install the pykefile library with pip. Requires Python 3.8 or higher.

python -m pip install pykefile

You can also add it your developement dependencies with poetry.

python -m poetry add pykefile --dev 

Usage:

Just like any other Makefile, you'll need the Pykefile in your current directory. (Pykefile.py also works)

Then use the pyke command to execute and run specified tasks.

Running pyke without any commands will call the default task if there is one. The first argument will call a task by that name.

Developement:

  1. Fork the repository: Fork
  2. Clone locally (git clone https://github.com/<username>/pyke.git)
  3. Create your feature branch (git checkout -b my-new-feature)
  4. Commit your changes (git commit -a -m 'Add some feature')
  5. Push to the branch (git push origin my-new-feature)
  6. Create a new Pull Request! 🎉

Running locally:

In order to properly test the pyke commands, install the package locally like so:

python -m pip install -e .

You can now use pyke in your terminal, and it will automatically use the latest changes to the source code.

Final Notes:

Pyke is still in beta and I'm open to feature requests or bug reports. Feel free to open an issue! Thanks for checking this project out and I hope it'll make your Python developement process easier!

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

pykefile-0.0.3.tar.gz (4.8 kB view details)

Uploaded Source

Built Distribution

pykefile-0.0.3-py3-none-any.whl (5.9 kB view details)

Uploaded Python 3

File details

Details for the file pykefile-0.0.3.tar.gz.

File metadata

  • Download URL: pykefile-0.0.3.tar.gz
  • Upload date:
  • Size: 4.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/3.10.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.8.0 tqdm/4.61.0 CPython/3.8.10

File hashes

Hashes for pykefile-0.0.3.tar.gz
Algorithm Hash digest
SHA256 0c14824502497678ca1d84d19b08552b8f00f03c4cbb954ee26d65d4087dcd21
MD5 2b078c50e2e81c491e44352af58ea880
BLAKE2b-256 50c5fedf58aa49705c3810725aa8f69d14683e94c2e7313fee69f1cd746b76b6

See more details on using hashes here.

File details

Details for the file pykefile-0.0.3-py3-none-any.whl.

File metadata

  • Download URL: pykefile-0.0.3-py3-none-any.whl
  • Upload date:
  • Size: 5.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/3.10.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.8.0 tqdm/4.61.0 CPython/3.8.10

File hashes

Hashes for pykefile-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 8f497d1f8606ccbc64ef08760f66d2dfcc477d8ad88346d192a2760aaa2c5db0
MD5 0c67d798b7a50e359b311a8f91fdde49
BLAKE2b-256 91e289319d5c9f15227c2317ed6b581e4467595519ee43cb118a25b0c3121b9e

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