Skip to main content

Build and manage programs simply

Project description

Travis Coveralls Stories in Ready Join the chat at https://gitter.im/starcraftman/pakit

Python License Version Status

Fork Me On Github

Description

Pakit is a small python based package manager that builds programs from source.

Pakit provides:

  1. A package manager interface to install, remove & update programs.

  2. A simple Recipe specification to build programs from source code.

  3. Premade and tested recipes maintained by pakit.

When you install a program Pakit will…

  1. download the source into a silo in pakit.paths.source and build it.

  2. install the program into a silo under pakit.paths.prefix.

  3. link the silo to the pakit.paths.link directory.

Want a longer explanation? See the Overview section.

Demo

The following demonstration covers most of the basic functions.

Pakit Demo

Try the demo yourself after installing pakit.

Install Pakit

To use pakit:

  1. Ensure you have a build environment for compiling the programs.

  2. Fetch pakit via pip or github.

  3. Modify your $PATH.

Build Environment

At this point pakit has two limitations to be aware of:

  • Relies on user’s build environment.

  • Pakit recipes can only depend on things pakit can build, currently limited pool. User needs to install any dependencies pakit can’t build.

To use pakit, I suggest you have…

  • c++ build environment

  • git

  • mercurial

  • anything a recipe depends on that pakit can’t build

For Ubuntu install these packages:

sudo apt-get install build-essential automake autoreconf python-pip git mercurial liblzma-dev libevent-dev ncurses-dev

Github

Fetch the latest from the source. Works unless the build badge says failing.

git clone https://github.com/starcraftman/pakit.git
export PATH=$(pwd)/pakit/bin:$PATH
sudo -H pip install argparse PyYAML
python pakit/setup.py release

pip

Install the latest stable pip release. It might be old but working.

sudo -H pip install pakit

PATH

By default, pakit will install programs under pakit.paths.prefix and link everything to pakit.paths.link. To use the built programs, pakit.paths.link/bin must be on your $PATH. So for example, with the default value of pakit.paths.link, you would need to:

export PATH=/tmp/pakit/links/bin:$PATH

The above exports will only last for the terminal session. To make them permanent for bash, edit $HOME/.bashrc or $HOME/.bash_aliases.

More Information

From inside the pakit source folder:

  • Help: pakit --help

  • Consult man: man pakit

  • Read pydocs: pydoc pakit or pydoc pakit.shell and so on…

  • Install all development packages: python setup.py deps

  • Run the test suite: tox

  • See Waffle for things I’m working on.

  • Read DESIGN.md for details on design. A bit out of date.

Contributors

  • Jeremy Pallats/starcraft.man (that is me)

Overview

Basically I want to make a universal package manager on python. Runs everywhere, builds anything and handles dependencies. A bit like a meta build tool tying arbitrary recipes together. At the end of the day, will probably resemble Homebrew at least a little.

Importantly, the recipes should be configurable via a single YAML file that users can modify without changing the recipes. Say you want to pass particular flags to the vim or ag build, you’d just put them in an entry in the config.

Expected Feature Overview:

  • Python only, with minimal dependencies.

  • Package manager interface, install remove and update recipes.

  • 100% tested, framework & supported recipes.

  • Should work on any POSIX system, emphasis on Linux.

  • Simple recipe specification.

  • Configuration via a single YAML file.

  • Available via pip.

  • Traceability via logs for every command.

  • Premade & tested recipes available for use.

See DESIGN.md for more details.

Roadmap

For accurate plan, see waffle.io link above. Just a rough guess of what I should be implementing when.

0.1

  • [x] Implement basic tasks to install & remove ‘ag’ program.

  • [x] Support Git & Hg repositories.

  • [x] Simple config from .pakit.yml.

  • [x] Upgrade logic.

  • [x] User defined recipe locations via config.

  • [x] Pick a license.

  • [x] Pip/Wheel upload.

0.2

  • [x] Add archive support, supports download, hashing & extracting.

  • [x] Tar (tarfile)

  • [x] Zip (zipfile)

  • [x] tar.xz (xz command)

  • [x] Rar (rar command)

  • [x] 7z (7z command)

  • [x] Add list & searching support.

  • [x] Python 3 support

  • [x] Better error handling, rollback

  • [x] Improve Command, timeout & input file

  • [x] Investigate alternatives/improvements to RecipeDB

0.3

  • [ ] Make a website and promote. Maybe use github pages.

  • [x] Dependency logic between recipes tasks.

  • [x] Research best approach & do small design.

  • [x] Create Digraph Structure (likely required).

  • [x] Create Recipe specification & implement.

  • [ ] Handle missing commands inside recipes. For example, recipe needs git but git unavailable.

  • [x] Separate recipes from pakit core.

  • [ ] Move to pakit/pakit. pakit

0.4

  • [ ] Parallelism, envisioned as some task based dependency.

Beyond

  • [ ] Create tool to convert homebrew ruby formula. Maybe?

Project details


Download files

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

Source Distributions

pakit-0.2.4.zip (64.8 kB view details)

Uploaded Source

pakit-0.2.4.tar.gz (43.5 kB view details)

Uploaded Source

Built Distribution

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

pakit-0.2.4-py2.py3-none-any.whl (54.6 kB view details)

Uploaded Python 2Python 3

File details

Details for the file pakit-0.2.4.zip.

File metadata

  • Download URL: pakit-0.2.4.zip
  • Upload date:
  • Size: 64.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for pakit-0.2.4.zip
Algorithm Hash digest
SHA256 65ea68796d308b02c44767005caeea6dccd63be785c5d145d559b9cf83aaefb8
MD5 da7821af2a6bef0fade10067eb8313f2
BLAKE2b-256 7f570cc3dab174992a1908365717f1601cc500d1376df4df7dceeafa4425edf5

See more details on using hashes here.

File details

Details for the file pakit-0.2.4.tar.gz.

File metadata

  • Download URL: pakit-0.2.4.tar.gz
  • Upload date:
  • Size: 43.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for pakit-0.2.4.tar.gz
Algorithm Hash digest
SHA256 96a61f57b9f319aad9ae0686ef209d4114b898a5fdf1d5d969d8015b9a98763e
MD5 a52de6b41f5ab576c945497e7745fb17
BLAKE2b-256 426b89571bfa2fb7a457d48ab64e86aedfac3fb7d9cf850ff9fb2f4c57fe2d4d

See more details on using hashes here.

File details

Details for the file pakit-0.2.4-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for pakit-0.2.4-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 c073180a227dca497a6b4abdbf9ad6d6bf1114cdac2ec717a94fab92ea0986d0
MD5 b1e2288e2646fd3a7cad1f5987057434
BLAKE2b-256 fdbe299bd7bb360d15260c4a69e3c1a7dd52dd35e6bc0046b69ba4bb4155c700

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