rdossant / modularity / fedmod

Forked from modularity/fedmod 5 years ago
Clone
README.md

fedmod modularity tools

fedmod provides tools for working with Fedora's modulemd metadata format that aren't related to actually building them (for build commands, see fedpkg and mbs-build).

Currently, this consists of:

  • fedmod rpm2module: generates a draft modulemd file based on existing RPM name.

Project status

fedmod is pre-release software originally written to work with the F26 Boltron prototype, and doesn't currently pass its own self tests without appropriate prior configuration of the test system.

It's in the process of being updated to have a clearer development focus, and to work with the native modularity metadata provided in Fedora 27.

Modulemd creation

fedmod rpm2module creates a modulemd file from the given package names. Output is written as modulemd-output.yaml when multiple packages are given as input, and <input-package-name>.yaml when a single package is given.

Local development

Runtime dependencies

The currently preferred means of installation is local installation with pip.

$ pip install .

This will pull in the required Python level dependencies from PyPI.

Some dependencies aren't currently available from PyPI, and will need to be installed system-wide (exact list TBD, but includes at least dnf and libsolv's Python bindings).

How to run tests

To start a shell that's correctly configured to run the tests with the library and all necessary dependencies installed:

$ pipenv --three --site-packages
$ PIP_IGNORE_INSTALLED=1 pipenv install --dev
$ pipenv shell

The PIP_IGNORE_INSTALLED=1 setting means that everything available to pip will be installed into the virtual environment based on Pipfile.lock, and only components that aren't installable with pip will be used from the system Python installation.

See the next section for additional preparation currently needed to run the tests.

The tests can then be run in the launched subshell with:

$ pytest tests

Note: the tests will currently fail. Fixing that is a work in progress :)

Reviewing dependencies

To see the Python level dependencies graph:

$ pew toggleglobalsitepackages
$ pipenv graph
$ pew toggleglobalsitepackages

(If you don't turn off global site-packages access first, you'll get the dependency graph of all the installed system Python components as well)