Skip to main content

toolmaker application

Project description

Introduction

This tool automates the build of Python tools according to a configuration file. The tools can be built with zapp, shiv, or pex.

Repositories

Binary distributions:

Source code:

Usage

Configuration

By default this tool looks for a configuration file toolmaker.cfg in the current working directory.

[toolmaker.tool.defaults]
tools_directory = ~/.local/bin/.toolmaker

[toolmaker.tool.zapp:deptree]
entry_point = deptree.cli:main
requirements =
    deptree

[toolmaker.tool.pex:http]
entry_point = http.server
requirements =

[toolmaker.tool.shiv:shiv]
entry_point = shiv.cli:main
requirements =
    shiv

Action

The action can be specified on the command line. Either one of:

  • --build, -b to build (already existing tools are skipped);

  • --rebuild, -r to rebuild (already existing tools are rebuilt);

  • --delete, -d to delete (tool target file is deleted if it exists, then its parent directory is deleted if it is empty).

The default action when no flag is specified is to build the tools.

Configuration

Place tools in current directory

[toolmaker.tool.defaults]
tools_directory =
tool_directory =

[toolmaker.tool.zapp:foo]
# ./foo

[toolmaker.tool.zapp:bar]
# ./bar

Place tools in specific directory

[toolmaker.tool.defaults]
tools_directory = /somewhere
tool_directory =

[toolmaker.tool.zapp:foo]
# /somewhere/foo

[toolmaker.tool.zapp:bar]
# /somewhere/bar

Place tools in subdirectories

[toolmaker.tool.defaults]
tools_directory = /somewhere

[toolmaker.tool.zapp:foo0]
# /somewhere/foo0/foo0

[toolmaker.tool.zapp:foo1]
tool_directory = foo0
# /somewhere/foo0/foo1

[toolmaker.tool.zapp:foo2]
# /somewhere/foo2/foo2

[toolmaker.tool.zapp:foo3]
tool_file = foo0
# /somewhere/foo3/foo0

Example to use with GNU stow

To use in combination with GNU Stow:

[toolmaker.tool.defaults]
tools_directory = ~/.local/bin/.toolmaker

[toolmaker.tool.zapp:foo0]
# ~/.local/bin/.toolmaker/foo0/foo0

[toolmaker.tool.zapp:foo1]
tool_directory = foo0
# ~/.local/bin/.toolmaker/foo0/foo1

[toolmaker.tool.zapp:foo2]
# ~/.local/bin/.toolmaker/foo2/foo2

[toolmaker.tool.zapp:foo3]
tool_file = foo0
# ~/.local/bin/.toolmaker/foo3/foo0

Details

Similar projects

Hacking

This project makes extensive use of tox, pytest, and GNU Make.

Development environment

Use following command to create a Python virtual environment with all necessary dependencies:

tox --recreate -e develop

This creates a Python virtual environment in the .tox/develop directory. It can be activated with the following command:

. .tox/develop/bin/activate

Run test suite

In a Python virtual environment run the following command:

make review

Outside of a Python virtual environment run the following command:

tox --recreate

Build and package

In a Python virtual environment run the following command:

make package

Outside of a Python virtual environment run the following command:

tox --recreate -e package

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

toolmaker-0.0.4.tar.gz (10.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

toolmaker-0.0.4-py3-none-any.whl (10.4 kB view details)

Uploaded Python 3

File details

Details for the file toolmaker-0.0.4.tar.gz.

File metadata

  • Download URL: toolmaker-0.0.4.tar.gz
  • Upload date:
  • Size: 10.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/44.0.0 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.7.1

File hashes

Hashes for toolmaker-0.0.4.tar.gz
Algorithm Hash digest
SHA256 22f8dc9cd2a2ed95d28f8389dc2e6a4dbfa55554fff41d09963c19bcd5fff063
MD5 a0b8f0f40c183079b03131da8ccef304
BLAKE2b-256 d129ca8302fe656a824df879bbea97928b727a9aa75cf03d24914f469879acad

See more details on using hashes here.

File details

Details for the file toolmaker-0.0.4-py3-none-any.whl.

File metadata

  • Download URL: toolmaker-0.0.4-py3-none-any.whl
  • Upload date:
  • Size: 10.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/44.0.0 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.7.1

File hashes

Hashes for toolmaker-0.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 45c3747c3a810d0db2fca693bb853ee5cd6b85a4cd1155a72752acc2c8a8cb4f
MD5 89020c0f983b0c2ab3c89df0101e8362
BLAKE2b-256 a40584cf2a54f7371765b19c2b2063ee098e0284b81ab6c4a5f23bebc091d4da

See more details on using hashes here.

Supported by

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