Skip to main content

setuptools_scm plugin for git archives

Project description

This is a setuptools_scm plugin that adds support for git archives (for example the ones GitHub automatically generates).

Note that it only works for archives of tagged commits (because git currently lacks a format option equivalent to git describe --tags).

Usage

Add 'setuptools_scm_git_archive' to the setup_requires parameter in your project’s setup.py file:

setup(
    ...,
    use_scm_version=True,
    setup_requires=['setuptools_scm', 'setuptools_scm_git_archive'],
    ...,
)

Create a .git_archival.txt file with the following content:

ref-names: $Format:%D$

Then add this line to the .gitattributes file:

.git_archival.txt  export-subst

Finally, don’t forget to commit these two files.

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

setuptools_scm_git_archive-1.1.tar.gz (3.0 kB view hashes)

Uploaded source

Built Distribution

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page