Skip to content
This repository was archived by the owner on May 5, 2024. It is now read-only.
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: Changaco/setuptools_scm_git_archive
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 1.2.1
Choose a base ref
...
head repository: Changaco/setuptools_scm_git_archive
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 1.3
Choose a head ref
  • 3 commits
  • 1 file changed
  • 1 contributor

Commits on Jun 27, 2022

  1. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    f91694e View commit details
  2. fix migration guide

    Changaco committed Jun 27, 2022

    Verified

    This commit was signed with the committer’s verified signature.
    scala-steward Scala Steward
    Copy the full SHA
    d45275f View commit details
  3. fix migration guide, again

    Changaco committed Jun 27, 2022

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    05460e6 View commit details
Showing with 10 additions and 25 deletions.
  1. +10 −25 README.rst
35 changes: 10 additions & 25 deletions README.rst
Original file line number Diff line number Diff line change
@@ -1,33 +1,18 @@
**This plugin is obsolete. ``setuptools_scm >= 7.0.0`` supports Git archives by itself.**

This is a `setuptools_scm <https://pypi.python.org/pypi/setuptools_scm>`_ plugin
that adds support for git archives (for example the ones GitHub automatically
generates).
Migration guide
---------------

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:

.. code:: python
setup(
...,
use_scm_version=True,
setup_requires=['setuptools_scm', 'setuptools_scm_git_archive'],
...,
)
Create a ``.git_archival.txt`` file with the following content::
Change the contents of the ``.git_archival.txt`` file in the root directory of your repository from::

ref-names: $Format:%D$

Then add this line to the ``.gitattributes`` file::
to::

.git_archival.txt export-subst
node: $Format:%H$
node-date: $Format:%cI$
describe-name: $Format:%(describe)$
ref-names: $Format:%D$

Finally, don't forget to commit these two files.
Remove ``setuptools_scm_git_archive`` from your project's dependencies (e.g. the
``setup_requires`` list in your ``setup.py`` file).