Skip to main content
Yanked

This release has been yanked by its maintainers, and will be ignored by installers, except when explicitly specified.
Reason given by maintainers: DO NOT USE: RPM builds may remove '/' upon uninstall.

PackageCore


pypi version travis ci status circle ci status readthedocs status

Python 3 library for building and testing Linux packages for multiple distributions. Works in Travis-CI and Circle-CI.

Documentation at packagecore.readthedocs.io.

Requirements

PackageCore is written in python 3 and uses the PyYAML and setuptools modules.

PackageCore utilizes Docker to provide the distribution environments for building and testing packages.

Installation

The easiest way to get PackageCore is via pip (after installing Docker and your distro's libyaml package).

pip3 install packagecore

Alternatively, Linux packages are provided on our release page or you can install in manually from this repo using the setup.py module.

./setup.py install

Execution

You can build packages by executing:

packagecore <version> [<release num>]

from the source directory.

In your source directory if packagecore.yaml contains the configuration. Otherwise, the configuration file can be explicitly specified:

packagecore -c myfile.yaml <version> [<release num>]

Use the -h flag to get a full list of options:

packagecore -h

Configuration

PackageCore uses YAML files for configuration. The basic structure is:

name: wx-calc
maintainer: Dominique LaSalle <packagecore@solidlake.com>
license: GPL3
summary: A simple calculator using wxWidgets.
homepage: https://solidlake.com
commands:
  compile:
    - mkdir build
    - cd build
    - cmake ../ -DCMAKE_INSTALL_PREFIX=/usr
    - make
  install:
    - make install -C build DESTDIR="${BP_DESTDIR}"
  testinstall:
    - ls /usr/bin/wxcalc
packages:
  archlinux:
    buildeps:
      - gcc
      - cmake
    deps:
      - wxgtk
    container: "example.com/my/custom/container"
  centos7.3:
    buildeps:
      - gcc
      - cmake
      - wxGTK3-devel
    deps:
      - wxGTK3
  fedora25:
    buildeps:
      - gcc
      - cmake
      - wxGTK3-devel
    deps:
      - wxGTK3
  ubuntu16.04:
    buildeps:
      - gcc
      - cmake
      - libwxgtk3-dev
    deps:
      - libwxgtk3-0v5

When executing install commands, the environment variable BP_DESTDIR is defined, and should be used as the root directory for installation (e.g., specify things like install -D -m755 mybin ${BP_DESTDIR}/usr/bin/mybin).

If a specifc Linux distribution requires special commands to build, you can override the top-level commands inside of the package listing:

  centos7.3:
    commands:
      compile:
        - mkdir build
        - cd build
        - cmake ../ -DCMAKE_INSTALL_PREFIX=/usr -DwxWidgets_CONFIG_EXECUTABLE=/usr/bin/wx-config-3.0

Usage in Travis-CI

To use in travis-ci, you must be using at least Ubuntu 14.04 (Trusty) with docker and sudo.

sudo: required
services:
  - docker

Then, add the following before_deploy commands:

before_deploy:
  - sudo apt-get update -qy
  - sudo apt-get install -qy python3 python3-pip libyaml-dev
  - sudo python3 -m pip install packagecore
  - packagecore -o dist "${TRAVIS_TAG#v}"

Which will build your packages with the version defined by your tag (assumes you prefixed it with a v), and place the packages in a dist directory. Then add the following to the deploy section:

deploy:
  ...
  file_glob: true
  file:
    - dist/*
  on:
    tags: true
  ...

If you want to upload your packages to your GitHub release page, follow the Travis-CI instructions for how to fill out the rest of the deploy section.

Usage in Circle-CI

To use in circle-ci, add the following to your configuration circle.yaml file (assuming version 1).

machine:
  services:
    - docker
...
deployment:
  package:
    tag: /^v.*$/
    commands:
      - sudo apt-get update -qy
      - sudo apt-get install -qy python3 python3-pip libyaml-dev
      - sudo python3 -m pip install packagecore
      - packagecore -o "${CIRCLE_ARTIFACTS}" "${CIRCLE_TAG#v}"

Release files for packagecore 0.11.11

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for packagecore 0.11.11
File Size Uploaded
packagecore-0.11.11.tar.gz 21.7 kB Details

Release files / packagecore-0.11.11.tar.gz

Download URL packagecore-0.11.11.tar.gz
Size 21.7 kB
Tags Source
SHA-256 checksum
How to use checksums
ec00824b1219e6048a9ec22f98f25b216bb05e9ae3ef5f2aafd73020bec316dc
BLAKE2b-256 checksum
How to use checksums
94915b92a360286ef30eb518f61f109debaa6d26fdd8991234bd3d24641d252c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/2.0.0 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.8.2

Release history Release notifications | RSS feed

This release

0.11.11 This release

1 release file

0.11.10

1 release file

0.11.9

1 release file

0.11.8

1 release file

0.11.7

1 release file

0.11.6

1 release file

0.11.5

1 release file

0.11.4

1 release file

0.11.3

1 release file

0.11.2

1 release file

0.11.1

1 release file

0.11.0

1 release file

0.10.0

1 release file

0.9.14

1 release file

0.9.13

1 release file

0.9.12

1 release file

0.9.11

1 release file

0.9.10

1 release file

0.9.9

1 release file

0.9.8

1 release file

0.9.7

1 release file

0.9.6

1 release file

0.9.5

1 release file

0.9.4

1 release file

0.9.3

1 release file

0.6.1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page