Skip to main content

Craft parts tooling

Project description

Craft Parts

Documentation Status

Craft-parts provides a mechanism to obtain data from different sources, process it in various ways, and prepare a filesystem subtree suitable for deployment. The components used in its project specification are called parts, which can be independently downloaded, built and installed, and also depend on each other in order to assemble the subtree containing the final artifacts.

License

Free software: GNU Lesser General Public License v3

Documentation

https://canonical-craft-parts.readthedocs-hosted.com/en/latest/

Contributing

A Makefile is provided for easy interaction with the project. To see all available options run:

make help

Development Environment

In order to develop any apt related items, the python-apt package is needed. The apt extra will require this package in general.

Ubuntu 22.04 is assumed in the rest of this setup

Development packages, such as those to build the Apt Python package are required:

sudo apt install libapt-pkg-dev intltool fuse-overlayfs python3.10-venv python3-dev gcc g++ make

The following are required to run integration tests (it is a default target for make tests):

sudo snap install chisel --candidate
sudo apt install ninja-build cmake scons qt5-qmake p7zip rpm \
                 autoconf automake autopoint gcc git gperf help2man libtool texinfo \
                 pkg-config

Create virtual environment to develop in and activate it:

python3 -m venv .venv
source .venv/bin/activate

Install the required Python packages

pip install -e .[dev,docs]
pip install https://launchpad.net/ubuntu/+archive/primary/+sourcefiles/python-apt/2.4.0ubuntu1/python-apt_2.4.0ubuntu1.tar.xz

Python Apt across Ubuntu series

Running tests

To run all tests in the suite run:

make tests

To get coverage information for Craft Parts from the unit tests:

make coverage

Adding new requirements

If a new dependency is added to the project run:

make freeze-requirements

Verifying documentation changes

To locally verify documentation changes run:

make docs

After running, newly generated documentation shall be available at ./docs/_build/html/.

Committing code

Please follow these guidelines when committing code for this project:

  • Use a topic with a colon to start the subject
  • Separate subject from body with a blank line
  • Limit the subject line to 50 characters
  • Do not capitalize the subject line
  • Do not end the subject line with a period
  • Use the imperative mood in the subject line
  • Wrap the body at 72 characters
  • Use the body to explain what and why (instead of how)

Project details


Release history Release notifications | RSS feed

Download files

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

Source Distribution

craft_parts-2.1.1.tar.gz (340.7 kB view details)

Uploaded Source

Built Distribution

craft_parts-2.1.1-py3-none-any.whl (434.7 kB view details)

Uploaded Python 3

File details

Details for the file craft_parts-2.1.1.tar.gz.

File metadata

  • Download URL: craft_parts-2.1.1.tar.gz
  • Upload date:
  • Size: 340.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.12.3

File hashes

Hashes for craft_parts-2.1.1.tar.gz
Algorithm Hash digest
SHA256 241fd9eb8b1bb064589c8e1a910c70f8280fb6661595dcc431b8295b49d844c1
MD5 9a20bbd4134bb150824437d9a8700f33
BLAKE2b-256 99b417baee71831469c10aa77e816977fbd0e8a5d479e4db5ba6ae744af503f5

See more details on using hashes here.

File details

Details for the file craft_parts-2.1.1-py3-none-any.whl.

File metadata

  • Download URL: craft_parts-2.1.1-py3-none-any.whl
  • Upload date:
  • Size: 434.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.12.3

File hashes

Hashes for craft_parts-2.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 4f8baf3e68507f591b0f0bd29f2e1628a704c0578bc2eb4658c54d9ef0c6016c
MD5 463f653d687ece8394bdff9ee98c967b
BLAKE2b-256 7098d39bab3c80e58cde97ed1479e4701550ad469f3a8e1ec597e7a2b751af64

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