@@ -255,16 +255,6 @@ To avoid BuildKit and mounting of the .git folder altogether, one can also pass
255
255
version as a build argument. Note that ``SETUPTOOLS_SCM_PRETEND_VERSION_FOR_${UPPERCASED_DIST_NAME} ``
256
256
is preferred over ``SETUPTOOLS_SCM_PRETEND_VERSION ``.
257
257
258
- Notable Plugins
259
- ---------------
260
-
261
- `setuptools_scm_git_archive <https://pypi.python.org/pypi/setuptools_scm_git_archive >`_
262
- Provides partial support for obtaining versions from git archives that
263
- belong to tagged versions. The only reason for not including it in
264
- ``setuptools_scm `` itself is Git/GitHub not supporting sufficient metadata
265
- for untagged/followup commits, which is preventing a consistent UX.
266
-
267
-
268
258
Default versioning scheme
269
259
-------------------------
270
260
@@ -313,11 +303,27 @@ Builtin mechanisms for obtaining version numbers
313
303
314
304
1. the SCM itself (git/hg)
315
305
2. ``.hg_archival `` files (mercurial archives)
316
- 3. ``PKG-INFO ``
306
+ 3. ``.git_archival.txt `` files (git archives, see subsection below)
307
+ 4. ``PKG-INFO ``
317
308
318
- .. note ::
309
+ Git archives
310
+ ~~~~~~~~~~~~
311
+
312
+ Git archives are supported, but a few changes to your repository are required.
313
+
314
+ Create a ``.git_archival.txt `` file in the root directory of your repository,
315
+ and copy-paste this into it::
316
+
317
+ ref-names: $Format:%(describe)$
318
+
319
+ Create the ``.gitattributes `` file in the root directory of your repository
320
+ if it doesn't already exist, and copy-paste this into it::
321
+
322
+ .git_archival.txt export-subst
323
+
324
+ Finally, don't forget to commit those two files::
319
325
320
- Git archives are not supported due to Git shortcomings
326
+ git add .git_archival.txt .gitattributes && git commit
321
327
322
328
323
329
File finders hook makes most of MANIFEST.in unnecessary
0 commit comments