sphinx-gitstamp 0.4.0__tar.gz → 0.4.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,12 +1,13 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.4
2
2
  Name: sphinx-gitstamp
3
- Version: 0.4.0
3
+ Version: 0.4.1
4
4
  Summary: git timestamp generator for Sphinx
5
5
  Author-email: Jared Dillard <jared.dillard@gmail.com>
6
6
  Maintainer-email: Jared Dillard <jared.dillard@gmail.com>
7
- License: MIT
7
+ License: BSD-3-Clause
8
8
  Project-URL: download, https://pypi.org/project/sphinx-gitstamp/
9
9
  Project-URL: source, https://github.com/jdillard/sphinx-gitstamp
10
+ Classifier: Development Status :: 7 - Inactive
10
11
  Classifier: Framework :: Sphinx :: Extension
11
12
  Classifier: License :: OSI Approved :: BSD License
12
13
  Classifier: Programming Language :: Python :: 3.7
@@ -17,8 +18,7 @@ Classifier: Programming Language :: Python :: 3.11
17
18
  Classifier: Topic :: Documentation :: Sphinx
18
19
  Description-Content-Type: text/x-rst
19
20
  License-File: LICENSE
20
- Requires-Dist: sphinx>=1.2
21
- Requires-Dist: gitpython
21
+ Dynamic: license-file
22
22
 
23
23
  Sphinx Gitstamp Generator Extension
24
24
  ===================================
@@ -29,6 +29,48 @@ your Sphinx documentation.
29
29
 
30
30
  |PyPI version| |Downloads| |Code style: Black| |Parallel Safe|
31
31
 
32
+ .. warning::
33
+
34
+ **This project is deprecated and no longer maintained.**
35
+ Please use `sphinx-last-updated-by-git`_ instead. It provides the same
36
+ functionality plus dependency tracking (included files, images, etc.),
37
+ shallow clone detection, timezone support, and uses Sphinx's standard
38
+ ``last_updated`` template variable, so many themes display it out of
39
+ the box.
40
+
41
+ Migrating to sphinx-last-updated-by-git
42
+ ---------------------------------------
43
+
44
+ 1. Swap the package::
45
+
46
+ pip uninstall sphinx-gitstamp
47
+ pip install sphinx-last-updated-by-git
48
+
49
+ 2. In **conf.py**, replace the extension:
50
+
51
+ .. code-block:: python
52
+
53
+ extensions = ['sphinx_last_updated_by_git'] # was 'sphinx_gitstamp'
54
+
55
+ 3. Replace ``gitstamp_fmt`` with Sphinx's built-in ``html_last_updated_fmt``:
56
+
57
+ .. code-block:: python
58
+
59
+ html_last_updated_fmt = "%b %d, %Y" # was gitstamp_fmt
60
+
61
+ 4. In your templates, replace ``gitstamp`` with ``last_updated``:
62
+
63
+ .. code-block:: jinja
64
+
65
+ {%- if last_updated %} This page was last updated on {{ last_updated }}. {%- endif %}
66
+
67
+ If your theme already displays ``last_updated``, you can remove the custom
68
+ template code entirely.
69
+
70
+ 5. If you build from a shallow clone (e.g. GitHub Actions, Read the Docs),
71
+ fetch full history so dates are correct. See the
72
+ `sphinx-last-updated-by-git`_ README for details.
73
+
32
74
  Installing
33
75
  ----------
34
76
 
@@ -81,6 +123,7 @@ University (http://www.cmu.edu/computing/).
81
123
  .. _language: https://www.sphinx-doc.org/en/master/usage/configuration.html#confval-language
82
124
  .. _LICENSE: LICENSE
83
125
  .. _Sphinx: http://sphinx-doc.org/
126
+ .. _sphinx-last-updated-by-git: https://github.com/mgeier/sphinx-last-updated-by-git
84
127
  .. _time format: https://docs.python.org/2/library/time.html#time.strftime
85
128
 
86
129
  .. |PyPI version| image:: https://img.shields.io/pypi/v/sphinx-gitstamp.svg
@@ -7,6 +7,48 @@ your Sphinx documentation.
7
7
 
8
8
  |PyPI version| |Downloads| |Code style: Black| |Parallel Safe|
9
9
 
10
+ .. warning::
11
+
12
+ **This project is deprecated and no longer maintained.**
13
+ Please use `sphinx-last-updated-by-git`_ instead. It provides the same
14
+ functionality plus dependency tracking (included files, images, etc.),
15
+ shallow clone detection, timezone support, and uses Sphinx's standard
16
+ ``last_updated`` template variable, so many themes display it out of
17
+ the box.
18
+
19
+ Migrating to sphinx-last-updated-by-git
20
+ ---------------------------------------
21
+
22
+ 1. Swap the package::
23
+
24
+ pip uninstall sphinx-gitstamp
25
+ pip install sphinx-last-updated-by-git
26
+
27
+ 2. In **conf.py**, replace the extension:
28
+
29
+ .. code-block:: python
30
+
31
+ extensions = ['sphinx_last_updated_by_git'] # was 'sphinx_gitstamp'
32
+
33
+ 3. Replace ``gitstamp_fmt`` with Sphinx's built-in ``html_last_updated_fmt``:
34
+
35
+ .. code-block:: python
36
+
37
+ html_last_updated_fmt = "%b %d, %Y" # was gitstamp_fmt
38
+
39
+ 4. In your templates, replace ``gitstamp`` with ``last_updated``:
40
+
41
+ .. code-block:: jinja
42
+
43
+ {%- if last_updated %} This page was last updated on {{ last_updated }}. {%- endif %}
44
+
45
+ If your theme already displays ``last_updated``, you can remove the custom
46
+ template code entirely.
47
+
48
+ 5. If you build from a shallow clone (e.g. GitHub Actions, Read the Docs),
49
+ fetch full history so dates are correct. See the
50
+ `sphinx-last-updated-by-git`_ README for details.
51
+
10
52
  Installing
11
53
  ----------
12
54
 
@@ -59,6 +101,7 @@ University (http://www.cmu.edu/computing/).
59
101
  .. _language: https://www.sphinx-doc.org/en/master/usage/configuration.html#confval-language
60
102
  .. _LICENSE: LICENSE
61
103
  .. _Sphinx: http://sphinx-doc.org/
104
+ .. _sphinx-last-updated-by-git: https://github.com/mgeier/sphinx-last-updated-by-git
62
105
  .. _time format: https://docs.python.org/2/library/time.html#time.strftime
63
106
 
64
107
  .. |PyPI version| image:: https://img.shields.io/pypi/v/sphinx-gitstamp.svg
@@ -14,6 +14,7 @@ maintainers = [
14
14
  {name = "Jared Dillard", email = "jared.dillard@gmail.com"},
15
15
  ]
16
16
  classifiers=[
17
+ "Development Status :: 7 - Inactive",
17
18
  "Framework :: Sphinx :: Extension",
18
19
  "License :: OSI Approved :: BSD License",
19
20
  "Programming Language :: Python :: 3.7",
@@ -23,7 +24,7 @@ classifiers=[
23
24
  "Programming Language :: Python :: 3.11",
24
25
  "Topic :: Documentation :: Sphinx",
25
26
  ]
26
- license = {text = "MIT"}
27
+ license = {text = "BSD-3-Clause"}
27
28
  readme = "README.rst"
28
29
  dynamic = [
29
30
  "version",
@@ -15,7 +15,7 @@ from pathlib import Path
15
15
 
16
16
  from sphinx import errors
17
17
 
18
- __version__ = "0.4.0"
18
+ __version__ = "0.4.1"
19
19
 
20
20
  # Gets the datestamp of the latest commit on the given file
21
21
  # Converts the datestamp into something more readable
@@ -1,12 +1,13 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.4
2
2
  Name: sphinx-gitstamp
3
- Version: 0.4.0
3
+ Version: 0.4.1
4
4
  Summary: git timestamp generator for Sphinx
5
5
  Author-email: Jared Dillard <jared.dillard@gmail.com>
6
6
  Maintainer-email: Jared Dillard <jared.dillard@gmail.com>
7
- License: MIT
7
+ License: BSD-3-Clause
8
8
  Project-URL: download, https://pypi.org/project/sphinx-gitstamp/
9
9
  Project-URL: source, https://github.com/jdillard/sphinx-gitstamp
10
+ Classifier: Development Status :: 7 - Inactive
10
11
  Classifier: Framework :: Sphinx :: Extension
11
12
  Classifier: License :: OSI Approved :: BSD License
12
13
  Classifier: Programming Language :: Python :: 3.7
@@ -17,8 +18,7 @@ Classifier: Programming Language :: Python :: 3.11
17
18
  Classifier: Topic :: Documentation :: Sphinx
18
19
  Description-Content-Type: text/x-rst
19
20
  License-File: LICENSE
20
- Requires-Dist: sphinx>=1.2
21
- Requires-Dist: gitpython
21
+ Dynamic: license-file
22
22
 
23
23
  Sphinx Gitstamp Generator Extension
24
24
  ===================================
@@ -29,6 +29,48 @@ your Sphinx documentation.
29
29
 
30
30
  |PyPI version| |Downloads| |Code style: Black| |Parallel Safe|
31
31
 
32
+ .. warning::
33
+
34
+ **This project is deprecated and no longer maintained.**
35
+ Please use `sphinx-last-updated-by-git`_ instead. It provides the same
36
+ functionality plus dependency tracking (included files, images, etc.),
37
+ shallow clone detection, timezone support, and uses Sphinx's standard
38
+ ``last_updated`` template variable, so many themes display it out of
39
+ the box.
40
+
41
+ Migrating to sphinx-last-updated-by-git
42
+ ---------------------------------------
43
+
44
+ 1. Swap the package::
45
+
46
+ pip uninstall sphinx-gitstamp
47
+ pip install sphinx-last-updated-by-git
48
+
49
+ 2. In **conf.py**, replace the extension:
50
+
51
+ .. code-block:: python
52
+
53
+ extensions = ['sphinx_last_updated_by_git'] # was 'sphinx_gitstamp'
54
+
55
+ 3. Replace ``gitstamp_fmt`` with Sphinx's built-in ``html_last_updated_fmt``:
56
+
57
+ .. code-block:: python
58
+
59
+ html_last_updated_fmt = "%b %d, %Y" # was gitstamp_fmt
60
+
61
+ 4. In your templates, replace ``gitstamp`` with ``last_updated``:
62
+
63
+ .. code-block:: jinja
64
+
65
+ {%- if last_updated %} This page was last updated on {{ last_updated }}. {%- endif %}
66
+
67
+ If your theme already displays ``last_updated``, you can remove the custom
68
+ template code entirely.
69
+
70
+ 5. If you build from a shallow clone (e.g. GitHub Actions, Read the Docs),
71
+ fetch full history so dates are correct. See the
72
+ `sphinx-last-updated-by-git`_ README for details.
73
+
32
74
  Installing
33
75
  ----------
34
76
 
@@ -81,6 +123,7 @@ University (http://www.cmu.edu/computing/).
81
123
  .. _language: https://www.sphinx-doc.org/en/master/usage/configuration.html#confval-language
82
124
  .. _LICENSE: LICENSE
83
125
  .. _Sphinx: http://sphinx-doc.org/
126
+ .. _sphinx-last-updated-by-git: https://github.com/mgeier/sphinx-last-updated-by-git
84
127
  .. _time format: https://docs.python.org/2/library/time.html#time.strftime
85
128
 
86
129
  .. |PyPI version| image:: https://img.shields.io/pypi/v/sphinx-gitstamp.svg
@@ -8,7 +8,6 @@ sphinx_gitstamp/__init__.py
8
8
  sphinx_gitstamp.egg-info/PKG-INFO
9
9
  sphinx_gitstamp.egg-info/SOURCES.txt
10
10
  sphinx_gitstamp.egg-info/dependency_links.txt
11
- sphinx_gitstamp.egg-info/requires.txt
12
11
  sphinx_gitstamp.egg-info/top_level.txt
13
12
  tests/conftest.py
14
13
  tests/test_simple.py
@@ -1,5 +1,7 @@
1
+ from pathlib import Path
2
+
1
3
  import pytest
2
- from sphinx.testing.path import path
4
+ import sphinx
3
5
 
4
6
  pytest_plugins = "sphinx.testing.fixtures"
5
7
  # Exclude 'roots' dirs for pytest test collector
@@ -14,4 +16,9 @@ def pytest_configure(config):
14
16
 
15
17
  @pytest.fixture(scope="session")
16
18
  def rootdir():
17
- return path(__file__).parent.abspath() / "roots"
19
+ if sphinx.version_info[:2] < (7, 2):
20
+ from sphinx.testing.path import path
21
+
22
+ return path(__file__).parent.abspath() / "roots"
23
+
24
+ return Path(__file__).resolve().parent / "roots"
@@ -1,2 +0,0 @@
1
- sphinx>=1.2
2
- gitpython
File without changes