Skip to main content

Pakk Package Manager.

Project description

Pakk Package Manager

Simple package manager using GitHub / GitLab / etc. as package index.

Originally designed for supporting the development on robotics applications using ROS 2, pakk is a flexible pakkage manager using GitHub as pakkage index. Pakk not only supports the installation of pakkages of different types, but also (auto-)starting / stopping of executable pakkages.

[!NOTE] Pakk is still in early development and might not be stable yet. Please report any issues you encounter.

TL;DR:

# Install
pip install pakk-package-manager
# Setup & reboot to ensure proper operation
pakk setup && sudo reboot now

# Install a pakkage
pakk install <PAKKAGE_NAME>
# Start the pakkage
pakk start <PAKKAGE_NAME>

Features & Compatibility

[!NOTE] At the moment, pakk is designed and tested to work on Linux/Ubuntu. However, some features might work out of the box on any OS (without guarantees) and the library is designed to be easily extensible in future.

Installation of Pakkages:

  • discovery of pakkages hosted on GitHub (or other sources using add-ins)
  • dependency resolving
  • installation of different pakkage types. Out-of-the-box available types:
    • ROS 2 (Robot Operating System 2) pakkages
    • Python pakkages
    • Asset pakkages (static data like images, audio, neural networks, etc.)
    • Static Web pakkages (built webapps) (work in progress)
    • Dynamic Web pakkages (reverse proxy apps) (work in progress)

Management of Pakkages:

  • starting / stopping of executable pakkages
  • enabling / disabling of executable pakkages for autostart
  • automatic update of installed pakkages

Getting Started

Installation of pakk

# Installation with pip
# Optionally create and activate a virtual environment
# (e.g. in case you get the "This environment is externally managed" error)
python3 -m venv .venv && source .venv/bin/activate
pip install pakk-package-manager
# or from source
pip install git+https://github.com/icampus-wildau/pakk

# Or install as pipx package in isolated environment
pipx install pakk-package-manager

[!NOTE] Make sure, that your path for installed python packages is added to PATH in order to make pakk executable. If pakkis not found as command, add something like export PATH="$PATH:/home/user/.local/bin" to your ~/.bashrc.

Setup and Configuration of pakk

After the installation, you need to setup pakk for your system. This includes the creation of the necessary directories and files. Some features of pakk require root access, so you might need to enter your password during the setup process.

[!IMPORTANT] Do NOT run the setup as root with sudo pakk setup, just call pakk setup and enter your authentication when asked.

pakk setup
# If you run setup for the first time, a reboot is recommended to ensure proper operation
sudo reboot now

By default, pakk uses its standard configuration, including default paths for the installed packages, etc. To adapt these configurations, you can run:

  • pakk cfg main for the main settings
  • pakk cfg <connector_name> for connector settings (e.g. pakk cfg GithubConnector to configure the connection to GitHub)

You can easily skip this step and continue with the default settings.

Install and start a pakkage

pakk install PACKAGE_NAME
# e.g. pakk install icampus-wildau/ros-i2c

When installing a pakkage, all required setup setups are executed and all dependencies are installed as well.

After installation, you can list your installed pakkages:

pakk ls

If the installed pakkage is executable, you can start it with:

# Run it interactively
pakk run PACKAGE_NAME

# Start it as a service
pakk start PACKAGE_NAME
# Enable it for autostart
pakk enable PACKAGE_NAME

# Stop it
pakk stop PACKAGE_NAME
# Disable it for autostart
pakk disable PACKAGE_NAME

# See the status of all startable pakkages
pakk status

You can enter pakk -h or pakk [CMD] -h to get an overview of other available commands and options for specific commands.

Create a pakkage

[!NOTE] The process of creating a pakkage can be supported by using the pakk init command, which interactively creates a pakk.cfg file in the current directory. However, for a more detailed creation, you might want to manually create/adapt the pakk.cfg file.

You can transform every of your projects/repositories to a pakkage by:

  • adding a pakk.cfg with your pakkage specifications to your project
  • releasing the pakkage on your index, e.g. if using GitHub by adding a tag

The pakk.cfg contains meta-information about your pakkage with at least the following:

# The obligatory meta-information
[info]
# The unique id of your pakkage matching the GitHub url suffix.
id = my_name/my_pakkage
# The current version (using semantic versioning) of your pakkage.
# This should match the tag of the release.
version = 1.2.5
# A short title
title = My Pakkage - a beautiful pakkage example
# A short description what your pakkage is for
description = Base framework for Flexible Intent Recognition
# Optionally a list of keywords
keywords = keyword1, keyword2

# Optionally the dependencies
[dependencies]
my_name/my_other_pakkage = ^0.5.0
some_org/another_pakkage = ^1.4.0

# Definition of the pakkage type

After the obligatory definition of the pakkage and the dependencies, one or multiple pakkage types can be added, to define the installation process. See the docs for creating a pakkage for a list of out-of-the-box supported types.

Contents of this Repository

Directory Content
docs Pakk usage and developer documentation.
pakk The python package containing the pakk source code.

Documentation

A more detailed documentation can be found at docs/README.md.

[!NOTE] The documentation is still in progress and might not be complete yet. If you have any questions or suggestions, feel free to open an issue or a discussion.

Questions & Issues

If you encounter any problems, please open an issue. If you have any questions, feel free to ask them in the Discussions section.

Contributing

Any contributions to extend the functionality or to solve existing problems are welcome!

Please read the CONTRIBUTING.md file before contributing to this project and follow the guidelines provided there. Also, make sure to read and follow the Code of Conduct.

Development setup

git clone https://github.com/icampus-wildau/pakk
cd pakk
git checkout dev
pip install -e .

FAQ

When using pakk in a virtual environment to install ROS2 pakkages, I get ModuleNotFoundError: No module named 'catkin_pkg' error

In newer python versions, a virtual environment is required to install packages with "pip". However, ROS 2

# As of June 2024, the ROS 2 Jazzy version is not compatible with the newest empy version
pip install catkin_pkg lark empy==3.3.4

You know, that "package" is spelled with "ck" and not with "kk"?!?

Yeah, we know :-)

License

This project is licensed under the Apache License 2.0. For details, please see the LICENSE file. By contributing to this project, you agree to abide by the terms and conditions of the Apache License 2.0.

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

pakk_package_manager-0.4.0.tar.gz (97.0 kB view details)

Uploaded Source

Built Distribution

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

pakk_package_manager-0.4.0-py3-none-any.whl (128.5 kB view details)

Uploaded Python 3

File details

Details for the file pakk_package_manager-0.4.0.tar.gz.

File metadata

  • Download URL: pakk_package_manager-0.4.0.tar.gz
  • Upload date:
  • Size: 97.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.9.19

File hashes

Hashes for pakk_package_manager-0.4.0.tar.gz
Algorithm Hash digest
SHA256 dcc97c7450b44a23ffce73312c1a1bf24e838ab268470294f9e623058ed4596d
MD5 2c819d99536f3569db3d25378404528d
BLAKE2b-256 cf4a30649783f552b821220a0b67b41614133f037d765d8e3722b04675e4fb42

See more details on using hashes here.

File details

Details for the file pakk_package_manager-0.4.0-py3-none-any.whl.

File metadata

File hashes

Hashes for pakk_package_manager-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a28013fcd28efe75be7fb9902d70766bde1965a18194cd05efbe1d97745d0801
MD5 f62b5c4a3c9e774f86ed06a94fe7888e
BLAKE2b-256 32dc18688acce3056253a242d2706319a28af68158a0a27a01143171d3c58fcd

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