Skip to main content

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.

Metadata

Release files for collect-unexported 0.1.1

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

Source distribution (sdist)

Source distribution for collect-unexported 0.1.1
File Size Uploaded
collect_unexported-0.1.1.tar.gz 18.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for collect-unexported 0.1.1
File Interpreter ABI Platform
collect_unexported-0.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 30.6 kB

Release files / collect_unexported-0.1.1.tar.gz

Download URL collect_unexported-0.1.1.tar.gz
Size 18.3 kB
Tags Source
SHA-256 checksum
How to use checksums
b0d73518997d5ce724c6bda63d1203d93423455c643e27839d83dae8ea949d8c
BLAKE2b-256 checksum
How to use checksums
490b6f833f608107876b5e936cd3c34443b1427430b5a8ac8d004549064aede8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.2

Release files / collect_unexported-0.1.1-py3-none-any.whl

Download URL collect_unexported-0.1.1-py3-none-any.whl
Size 12.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9b9cbcd6a928e8123afaf8bfab05a08dec42648cee31e0a1c9996b1a7d717e69
BLAKE2b-256 checksum
How to use checksums
b02b6dc8c12d22a05c8634359a62d6c695165f0bf72bfd31c962b2d80ffc33a2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.2

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files

0.1.0

2 release files

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