Skip to main content

Collect some files excluded from the release tarball

Project description

Collect files omitted from the release tarballs

[Home | GitLab | PyPI]

Overview

Some projects explicitly exclude some development files from their release tarballs. Sometimes, when packaging those projects, it may be useful to have these files around, e.g. for running tests.

The collect-unexported utility examines the control files within a Debian source package, clones its upstream repository, and then creates an additional source file archive containing some of the files that have explicitly been omitted from the upstream archive. This allows a Debian package to e.g. run some source tests that use scripts and data files that the upstream authors exclude from the distributed source archive. The collect-unexported tool creates an additional (component) original tarball (.orig-unexported.tar.gz) and places it in the directory where the Debian packaging tools expect to find the original source tarball (the .orig.tar.gz one).

Please note that the collect-unexported tool is limited in its functionality; it is meant to handle several specific cases, and it may fail in others.

Examples

Use the collect-unexported.toml file in the current directory, create an additional source tarball, display some diagnostic information in the process:

collect-unexported -v

Use a file with a different name, do not overwrite the source tarball:

collect-unexported -c unexported.toml -N

The configuration file

To figure out which files it needs to repack from the upstream repository, the collect-unexported tool reads a TOML file, collect-unexported.toml by default. That file must currently contain two sections:

  • [format.version]: a table containing two fields, major and minor, describing the format of the configuration file itself. The only version currently supported version is "0.1".
  • [files]: a table that describes the files that need to be included:
    • include: a list of strings, each specifying the relative path from the top of the source repository to a single file or directory to be included in the component archive

Note that all the paths specified in the files.include list must be excluded in the upstream project's .gitattributes file using the export-ignore attribute.

An example configuration file for packing the contents of the tests and test_data subdirectories may look like this:

[format.version]
major = 0
minor = 1

[files]
include = [
  "test_data",
  "tests",
]

Contact

The collect-unexported tool is developed in a GitLab repository and is hosted at Ringlet. A Python package may be downloaded from the Python package index.

The author, Peter Pentchev, may be contacted via e-mail.

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

collect_unexported-0.1.1.tar.gz (18.3 kB view details)

Uploaded Source

Built Distribution

collect_unexported-0.1.1-py3-none-any.whl (12.3 kB view details)

Uploaded Python 3

File details

Details for the file collect_unexported-0.1.1.tar.gz.

File metadata

  • Download URL: collect_unexported-0.1.1.tar.gz
  • Upload date:
  • Size: 18.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.2

File hashes

Hashes for collect_unexported-0.1.1.tar.gz
Algorithm Hash digest
SHA256 b0d73518997d5ce724c6bda63d1203d93423455c643e27839d83dae8ea949d8c
MD5 250fa746e85bd73f2efddea3355c2f87
BLAKE2b-256 490b6f833f608107876b5e936cd3c34443b1427430b5a8ac8d004549064aede8

See more details on using hashes here.

File details

Details for the file collect_unexported-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for collect_unexported-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 9b9cbcd6a928e8123afaf8bfab05a08dec42648cee31e0a1c9996b1a7d717e69
MD5 ad21707a8e03441ab83da827866fba3f
BLAKE2b-256 b02b6dc8c12d22a05c8634359a62d6c695165f0bf72bfd31c962b2d80ffc33a2

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