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.0.tar.gz (3.0 kB view details)

Uploaded Source

Built Distribution

setuptools_scm_git_archive-1.0-py2.py3-none-any.whl (3.7 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file setuptools_scm_git_archive-1.0.tar.gz.

File metadata

File hashes

Hashes for setuptools_scm_git_archive-1.0.tar.gz
Algorithm Hash digest
SHA256 52425f905518247c685fc64c5fdba6e1e74443c8562e141c8de56059be0e31da
MD5 cb4ca99e97edea548117fe0d80cbd089
BLAKE2b-256 1800754438f629dfff1ecdbb31c8c23effe8bcfdbf65dbaf1cbed58eab286d82

See more details on using hashes here.

Provenance

File details

Details for the file setuptools_scm_git_archive-1.0-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for setuptools_scm_git_archive-1.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 af6b40a3f2f6d79b2b6b495258ff441641908ff2c4c9aaa66765b87ec6f72c35
MD5 e3c7df1ee782a171696ea1cdc3a05787
BLAKE2b-256 24fc42b5d0d6ea83d51fcd1a2a01ef056bec58414996c6342cda72bdd92e700d

See more details on using hashes here.

Provenance

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