crosspm2

Cross Package Manager (CrossPM)

build codacy pypi license

Introduction

CrossPM (Cross Package Manager) is a universal extensible package manager. It lets you download and as a next step - manage packages of different types from different repositories.

Out-of-the-box modules:

Modules planned to implement:

We also need your feedback to let us know which repositories and package formats do you need, so we could plan its implementation.

The biggest feature of CrossPM is flexibility. It is fully customizable, i.e. repository structure, package formats, packages version templates, etc.

To handle all the power it have, you need to write configuration file (crosspm.yaml) and manifest file with the list of packages you need to download.

Configuration file format is YAML, as you could see from its filename, so you free to use yaml hints and tricks, as long, as main configuration parameters remains on their levels :)

CrossPM uses Python 3.4-3.6

Installation

To install CrossPM, simply:

  pip install crosspm

Usage

To see commandline parameters help, run:

  crosspm --help

You’ll see something like this:

Usage:
    crosspm download [options]
    crosspm lock [DEPS] [DEPSLOCK] [options]
    crosspm usedby [DEPS] [options]
    crosspm pack <OUT> <SOURCE> [options]
    crosspm cache [size | age | clear [hard]]
    crosspm -h | --help
    crosspm --version

Options:
    <OUT>                                Output file.
    <SOURCE>                             Source directory path.
    -h, --help                           Show this screen.
    --version                            Show version.
    -L, --list                           Do not load packages and its dependencies. Just show what's found.
    -v LEVEL, --verbose=LEVEL            Set output verbosity: ({verb_level}) [default: ].
    -l LOGFILE, --log=LOGFILE            File name for log output. Log level is '{log_default}' if set when verbose doesn't.
    -c FILE, --config=FILE               Path to configuration file.
    -o OPTIONS, --options OPTIONS        Extra options.
    --deps-path=FILE                     Path to file with dependencies [./{deps_default}]
    --depslock-path=FILE                 Path to file with locked dependencies [./{deps_lock_default}]
    --dependencies-content=CONTENT       Content for dependencies.txt file
    --dependencies-lock-content=CONTENT  Content for dependencies.txt.lock file
    --lock-on-success                    Save file with locked dependencies next to original one if download succeeds
    --out-format=TYPE                    Output data format. Available formats:({out_format}) [default: {out_format_default}]
    --output=FILE                        Output file name (required if --out_format is not stdout)
    --output-template=FILE               Template path, e.g. nuget.packages.config.j2 (required if --out_format=jinja)
    --no-fails                           Ignore fails config if possible.
    --recursive=VALUE                    Process all packages recursively to find and lock all dependencies
    --prefer-local                       Do not search package if exist in cache
    --stdout                             Print info and debug message to STDOUT, error to STDERR. Otherwise - all messages to STDERR

Other pages

Development

We use modified script for generate Table of content: https://github.com/ekalinin/github-markdown-toc

# Prepare
export GH_TOC_TOKEN="$(pwd)/token.txt" # or other path to token.txt with your github token
BASE=$(pwd) # crosspm git folder

# Process one file, eg FAQ.md
cd ./docs
$BASE/gh-md-toc --insert FAQ.md

# Process all files
bash toc.sh