pkg-about 1.1.8__zip → 1.2.2__zip

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.
Files changed (28) hide show
  1. {pkg_about-1.1.8 → pkg_about-1.2.2}/CHANGES.rst +14 -0
  2. {pkg_about-1.1.8 → pkg_about-1.2.2}/PKG-INFO +41 -25
  3. {pkg_about-1.1.8 → pkg_about-1.2.2}/README.rst +9 -8
  4. {pkg_about-1.1.8 → pkg_about-1.2.2}/docs/conf.py +1 -1
  5. {pkg_about-1.1.8 → pkg_about-1.2.2}/pyproject.toml +57 -56
  6. {pkg_about-1.1.8 → pkg_about-1.2.2}/src/pkg_about/__about__.py +0 -1
  7. {pkg_about-1.1.8 → pkg_about-1.2.2}/src/pkg_about/_about.py +30 -3
  8. {pkg_about-1.1.8 → pkg_about-1.2.2}/src/pkg_about.egg-info/PKG-INFO +41 -25
  9. pkg_about-1.2.2/src/pkg_about.egg-info/requires.txt +21 -0
  10. {pkg_about-1.1.8 → pkg_about-1.2.2}/tests/test_main.py +6 -6
  11. pkg_about-1.1.8/src/pkg_about.egg-info/requires.txt +0 -19
  12. {pkg_about-1.1.8 → pkg_about-1.2.2}/.readthedocs.yml +0 -0
  13. {pkg_about-1.1.8 → pkg_about-1.2.2}/LICENSE +0 -0
  14. {pkg_about-1.1.8 → pkg_about-1.2.2}/MANIFEST.in +0 -0
  15. {pkg_about-1.1.8 → pkg_about-1.2.2}/docs/CHANGES.rst +0 -0
  16. {pkg_about-1.1.8 → pkg_about-1.2.2}/docs/README.rst +0 -0
  17. {pkg_about-1.1.8 → pkg_about-1.2.2}/docs/_static/.keep +0 -0
  18. {pkg_about-1.1.8 → pkg_about-1.2.2}/docs/_templates/.keep +0 -0
  19. {pkg_about-1.1.8 → pkg_about-1.2.2}/docs/index.rst +0 -0
  20. {pkg_about-1.1.8 → pkg_about-1.2.2}/setup.cfg +0 -0
  21. {pkg_about-1.1.8 → pkg_about-1.2.2}/src/pkg_about/__init__.py +0 -0
  22. {pkg_about-1.1.8 → pkg_about-1.2.2}/src/pkg_about.egg-info/SOURCES.txt +0 -0
  23. {pkg_about-1.1.8 → pkg_about-1.2.2}/src/pkg_about.egg-info/dependency_links.txt +0 -0
  24. {pkg_about-1.1.8 → pkg_about-1.2.2}/src/pkg_about.egg-info/top_level.txt +0 -0
  25. {pkg_about-1.1.8 → pkg_about-1.2.2}/src/pkg_about.egg-info/zip-safe +0 -0
  26. {pkg_about-1.1.8 → pkg_about-1.2.2}/tests/__init__.py +0 -0
  27. {pkg_about-1.1.8 → pkg_about-1.2.2}/tests/__main__.py +0 -0
  28. {pkg_about-1.1.8 → pkg_about-1.2.2}/tests/data/.keep +0 -0
@@ -1,6 +1,20 @@
1
1
  Changelog
2
2
  =========
3
3
 
4
+ 1.2.2 (2024-10-30)
5
+ ------------------
6
+ - Setup (dependencies) update.
7
+
8
+ 1.2.1 (2024-10-09)
9
+ ------------------
10
+ - Setup (dependencies) update.
11
+
12
+ 1.2.0 (2024-09-30)
13
+ ------------------
14
+ - Drop support for Python 3.8
15
+ - Ability to obtain __copyright__ from the README.rst content.
16
+ - Setup (dependencies) update.
17
+
4
18
  1.1.8 (2024-08-13)
5
19
  ------------------
6
20
  - Add support for Python 3.13
@@ -1,18 +1,18 @@
1
1
  Metadata-Version: 2.1
2
- Name: pkg-about
3
- Version: 1.1.8
2
+ Name: pkg_about
3
+ Version: 1.2.2
4
4
  Summary: Shares Python package metadata at runtime.
5
5
  Author: Adam Karpierz
6
6
  Author-email: adam@karpierz.net
7
7
  Maintainer: Adam Karpierz
8
8
  Maintainer-email: adam@karpierz.net
9
9
  License: zlib/libpng License ; https://opensource.org/license/zlib
10
- Project-URL: Homepage, https://pypi.org/project/pkg-about/
10
+ Project-URL: Homepage, https://pypi.org/project/pkg_about/
11
11
  Project-URL: Documentation, https://pkg-about.readthedocs.io/
12
- Project-URL: Download, https://pypi.org/project/pkg-about/
13
- Project-URL: Source, https://github.com/karpierz/pkg-about
14
- Project-URL: Issues, https://github.com/karpierz/pkg-about/issues
15
- Keywords: pkg-about,pkg_about,__about__,packaging
12
+ Project-URL: Download, https://pypi.org/project/pkg_about/
13
+ Project-URL: Source, https://github.com/karpierz/pkg_about
14
+ Project-URL: Issues, https://github.com/karpierz/pkg_about/issues
15
+ Keywords: pkg_about,__about__,packaging
16
16
  Platform: any
17
17
  Classifier: Development Status :: 5 - Production/Stable
18
18
  Classifier: Intended Audience :: Developers
@@ -21,7 +21,6 @@ Classifier: Operating System :: OS Independent
21
21
  Classifier: Natural Language :: Polish
22
22
  Classifier: Programming Language :: Python
23
23
  Classifier: Programming Language :: Python :: 3
24
- Classifier: Programming Language :: Python :: 3.8
25
24
  Classifier: Programming Language :: Python :: 3.9
26
25
  Classifier: Programming Language :: Python :: 3.10
27
26
  Classifier: Programming Language :: Python :: 3.11
@@ -31,26 +30,28 @@ Classifier: Programming Language :: Python :: 3 :: Only
31
30
  Classifier: Programming Language :: Python :: Implementation :: CPython
32
31
  Classifier: Programming Language :: Python :: Implementation :: PyPy
33
32
  Classifier: Topic :: Software Development :: Libraries :: Python Modules
34
- Requires-Python: <4.0.0,>=3.8.10
33
+ Requires-Python: <4.0.0,>=3.9.0
35
34
  Description-Content-Type: text/x-rst; charset=UTF-8
36
35
  License-File: LICENSE
37
- Requires-Dist: setuptools>=72.2.0
36
+ Requires-Dist: setuptools>=75.3.0
38
37
  Requires-Dist: packaging>=24.1.0
39
- Requires-Dist: tomli>=2.0.1; python_version < "3.11"
38
+ Requires-Dist: importlib-metadata>=8.5.0
39
+ Requires-Dist: tomli>=2.0.2; python_version < "3.11"
40
+ Requires-Dist: docutils>=0.21.2
40
41
  Provides-Extra: doc
41
- Requires-Dist: Sphinx>=7.1.2; extra == "doc"
42
- Requires-Dist: sphinx-toolbox>=3.7.0; extra == "doc"
42
+ Requires-Dist: Sphinx>=7.4.7; extra == "doc"
43
+ Requires-Dist: sphinx-toolbox>=3.8.1; extra == "doc"
43
44
  Requires-Dist: sphinx-tabs>=3.4.5; extra == "doc"
44
45
  Requires-Dist: sphinx-copybutton>=0.5.2; extra == "doc"
45
46
  Requires-Dist: sphinxcontrib-spelling>=8.0.0; extra == "doc"
46
- Requires-Dist: sphinx-lint>=0.9.1; extra == "doc"
47
+ Requires-Dist: sphinx-lint>=1.0.0; extra == "doc"
47
48
  Requires-Dist: restructuredtext-lint>=1.4.0; extra == "doc"
48
- Requires-Dist: nbsphinx>=0.9.4; extra == "doc"
49
+ Requires-Dist: nbsphinx>=0.9.5; extra == "doc"
49
50
  Provides-Extra: test
50
- Requires-Dist: deepdiff>=7.0.1; extra == "test"
51
- Requires-Dist: rich>=13.7.1; extra == "test"
51
+ Requires-Dist: deepdiff>=8.0.1; extra == "test"
52
+ Requires-Dist: rich>=13.9.4; extra == "test"
52
53
 
53
- pkg-about
54
+ pkg_about
54
55
  =========
55
56
 
56
57
  Shares Python package metadata at runtime.
@@ -74,7 +75,7 @@ Installation
74
75
 
75
76
  Prerequisites:
76
77
 
77
- + Python 3.8 or higher
78
+ + Python 3.9 or higher
78
79
 
79
80
  * https://www.python.org/
80
81
 
@@ -123,7 +124,7 @@ or on development mode:
123
124
  License
124
125
  =======
125
126
 
126
- | Copyright (c) 2020-2024 Adam Karpierz
127
+ | |copyright|
127
128
  | Licensed under the zlib/libpng License
128
129
  | https://opensource.org/license/zlib
129
130
  | Please refer to the accompanying LICENSE file.
@@ -133,16 +134,31 @@ Authors
133
134
 
134
135
  * Adam Karpierz <adam@karpierz.net>
135
136
 
136
- .. |package| replace:: pkg-about
137
- .. |package_bold| replace:: **pkg-about**
138
- .. |respository| replace:: https://github.com/karpierz/pkg-about.git
139
- .. _Development page: https://github.com/karpierz/pkg-about
140
- .. _PyPI record: https://pypi.org/project/pkg-about/
137
+ .. |package| replace:: pkg_about
138
+ .. |package_bold| replace:: **pkg_about**
139
+ .. |copyright| replace:: Copyright (c) 2020-2024 Adam Karpierz
140
+ .. |respository| replace:: https://github.com/karpierz/pkg_about.git
141
+ .. _Development page: https://github.com/karpierz/pkg_about
142
+ .. _PyPI record: https://pypi.org/project/pkg_about/
141
143
  .. _Documentation: https://pkg-about.readthedocs.io/
142
144
 
143
145
  Changelog
144
146
  =========
145
147
 
148
+ 1.2.2 (2024-10-30)
149
+ ------------------
150
+ - Setup (dependencies) update.
151
+
152
+ 1.2.1 (2024-10-09)
153
+ ------------------
154
+ - Setup (dependencies) update.
155
+
156
+ 1.2.0 (2024-09-30)
157
+ ------------------
158
+ - Drop support for Python 3.8
159
+ - Ability to obtain __copyright__ from the README.rst content.
160
+ - Setup (dependencies) update.
161
+
146
162
  1.1.8 (2024-08-13)
147
163
  ------------------
148
164
  - Add support for Python 3.13
@@ -1,4 +1,4 @@
1
- pkg-about
1
+ pkg_about
2
2
  =========
3
3
 
4
4
  Shares Python package metadata at runtime.
@@ -22,7 +22,7 @@ Installation
22
22
 
23
23
  Prerequisites:
24
24
 
25
- + Python 3.8 or higher
25
+ + Python 3.9 or higher
26
26
 
27
27
  * https://www.python.org/
28
28
 
@@ -71,7 +71,7 @@ or on development mode:
71
71
  License
72
72
  =======
73
73
 
74
- | Copyright (c) 2020-2024 Adam Karpierz
74
+ | |copyright|
75
75
  | Licensed under the zlib/libpng License
76
76
  | https://opensource.org/license/zlib
77
77
  | Please refer to the accompanying LICENSE file.
@@ -81,9 +81,10 @@ Authors
81
81
 
82
82
  * Adam Karpierz <adam@karpierz.net>
83
83
 
84
- .. |package| replace:: pkg-about
85
- .. |package_bold| replace:: **pkg-about**
86
- .. |respository| replace:: https://github.com/karpierz/pkg-about.git
87
- .. _Development page: https://github.com/karpierz/pkg-about
88
- .. _PyPI record: https://pypi.org/project/pkg-about/
84
+ .. |package| replace:: pkg_about
85
+ .. |package_bold| replace:: **pkg_about**
86
+ .. |copyright| replace:: Copyright (c) 2020-2024 Adam Karpierz
87
+ .. |respository| replace:: https://github.com/karpierz/pkg_about.git
88
+ .. _Development page: https://github.com/karpierz/pkg_about
89
+ .. _PyPI record: https://pypi.org/project/pkg_about/
89
90
  .. _Documentation: https://pkg-about.readthedocs.io/
@@ -34,7 +34,7 @@ release = about.__version__
34
34
 
35
35
  # If your documentation needs a minimal Sphinx version, state it here.
36
36
  #
37
- needs_sphinx = '3.4.3'
37
+ needs_sphinx = '7.4.7'
38
38
 
39
39
  # Add any Sphinx extension module names here, as strings. They can be
40
40
  # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
@@ -3,17 +3,17 @@
3
3
 
4
4
  [build-system]
5
5
  build-backend = 'setuptools.build_meta'
6
- requires = ['setuptools>=72.2.0', 'wheel>=0.44.0', 'packaging>=24.1.0', 'tox>=4.18.0']
6
+ requires = ['setuptools>=75.3.0', 'wheel>=0.44.0', 'packaging>=24.1.0', 'tox>=4.23.2']
7
7
 
8
8
  [project]
9
- name = 'pkg-about'
10
- version = '1.1.8'
9
+ name = 'pkg_about'
10
+ version = '1.2.2'
11
11
  description = 'Shares Python package metadata at runtime.'
12
- urls.Homepage = 'https://pypi.org/project/pkg-about/'
12
+ urls.Homepage = 'https://pypi.org/project/pkg_about/'
13
13
  urls.Documentation = 'https://pkg-about.readthedocs.io/'
14
- urls.Download = 'https://pypi.org/project/pkg-about/'
15
- urls.Source = 'https://github.com/karpierz/pkg-about'
16
- urls.Issues = 'https://github.com/karpierz/pkg-about/issues'
14
+ urls.Download = 'https://pypi.org/project/pkg_about/'
15
+ urls.Source = 'https://github.com/karpierz/pkg_about'
16
+ urls.Issues = 'https://github.com/karpierz/pkg_about/issues'
17
17
  license = { text = 'zlib/libpng License ; https://opensource.org/license/zlib' }
18
18
  authors = [
19
19
  { name = 'Adam Karpierz' },
@@ -23,7 +23,7 @@ maintainers = [
23
23
  { name = 'Adam Karpierz' },
24
24
  { email = 'adam@karpierz.net' },
25
25
  ]
26
- keywords = ['pkg-about', 'pkg_about', '__about__', 'packaging']
26
+ keywords = ['pkg_about', '__about__', 'packaging']
27
27
  classifiers = [
28
28
  'Development Status :: 5 - Production/Stable',
29
29
  'Intended Audience :: Developers',
@@ -32,7 +32,6 @@ classifiers = [
32
32
  'Natural Language :: Polish',
33
33
  'Programming Language :: Python',
34
34
  'Programming Language :: Python :: 3',
35
- 'Programming Language :: Python :: 3.8',
36
35
  'Programming Language :: Python :: 3.9',
37
36
  'Programming Language :: Python :: 3.10',
38
37
  'Programming Language :: Python :: 3.11',
@@ -43,29 +42,31 @@ classifiers = [
43
42
  'Programming Language :: Python :: Implementation :: PyPy',
44
43
  'Topic :: Software Development :: Libraries :: Python Modules',
45
44
  ]
46
- requires-python = '>=3.8.10,<4.0.0'
45
+ requires-python = '>=3.9.0,<4.0.0'
47
46
  dependencies = [
48
47
  # mandatory
49
- 'setuptools>=72.2.0',
48
+ 'setuptools>=75.3.0',
50
49
  'packaging>=24.1.0',
51
- 'tomli>=2.0.1 ; python_version < "3.11"',
50
+ 'importlib-metadata>=8.5.0',
51
+ 'tomli>=2.0.2 ; python_version < "3.11"',
52
+ 'docutils>=0.21.2',
52
53
  # others
53
54
  ]
54
55
  dynamic = ['readme']
55
56
  [project.optional-dependencies]
56
57
  doc = [
57
- 'Sphinx>=7.1.2',
58
- 'sphinx-toolbox>=3.7.0',
59
- 'sphinx-tabs>=3.4.5',
58
+ 'Sphinx>=7.4.7',
59
+ 'sphinx-toolbox>=3.8.1',
60
+ 'sphinx-tabs>=3.4.5', # don't touch! sphinx-toolbox requires <3.4.7
60
61
  'sphinx-copybutton>=0.5.2',
61
62
  'sphinxcontrib-spelling>=8.0.0',
62
- 'sphinx-lint>=0.9.1',
63
+ 'sphinx-lint>=1.0.0',
63
64
  'restructuredtext-lint>=1.4.0',
64
- 'nbsphinx>=0.9.4',
65
+ 'nbsphinx>=0.9.5',
65
66
  ]
66
67
  test = [
67
- 'deepdiff>=7.0.1',
68
- 'rich>=13.7.1',
68
+ 'deepdiff>=8.0.1',
69
+ 'rich>=13.9.4',
69
70
  ]
70
71
 
71
72
  [project.scripts]
@@ -159,43 +160,43 @@ count = true
159
160
  [tool.tox]
160
161
  legacy_tox_ini = """
161
162
  [tox]
162
- envlist = py{38,39,310,311,312,313}, pypy{39,310}, docs
163
+ env_list = py{39,310,311,312,313}, pypy{39,310}, docs
163
164
  labels =
164
- py = py{38,39,310,311,312,313}, pypy{39,310}
165
+ py = py{39,310,311,312,313}, pypy{39,310}
165
166
  prepare = prepare
166
167
  coverage = coverage
167
168
  lint = lint
168
169
  docs = docs
169
- build = py{38,39,310,311,312,313}, pypy{39,310}, docs, build
170
- deploy = py{38,39,310,311,312,313}, pypy{39,310}, docs, build, publish
171
- minversion = 4.18.0
170
+ build = py{39,310,311,312,313}, pypy{39,310}, docs, build
171
+ deploy = py{39,310,311,312,313}, pypy{39,310}, docs, build, publish
172
+ min_version = 4.23.2
172
173
  skip_missing_interpreters = true
173
174
  requires =
174
175
  {[base]deps}
175
- virtualenv>=20.26.3
176
+ virtualenv>=20.27.1
176
177
  tox-tags>=0.2.0
177
178
 
178
179
  [base]
179
- basepython = python3.12
180
+ base_python = python3.12
180
181
  deps =
181
- pip>=24.2.0
182
- setuptools>=72.2.0
182
+ pip>=24.3.1
183
+ setuptools>=75.3.0
183
184
  wheel>=0.44.0
184
- packagesubdir = pkg_about
185
+ package_subdir = pkg_about
185
186
 
186
187
  [testenv]
187
- passenv = WINDIR
188
- setenv =
188
+ pass_env = WINDIR
189
+ set_env =
189
190
  PYTHONDONTWRITEBYTECODE = 1
190
191
  commands =
191
- {envpython} --version
192
- {envpython} -m tests {posargs}
192
+ {env_python} --version
193
+ {env_python} -m tests {posargs}
193
194
  extras = test
194
195
  deps =
195
196
  {[base]deps}
196
197
 
197
198
  [testenv:prepare]
198
- basepython = {[base]basepython}
199
+ base_python = {[base]base_python}
199
200
  skip_install = true
200
201
  allowlist_externals =
201
202
  cmd
@@ -204,56 +205,56 @@ commands =
204
205
  cmd /C if exist .build.cmd .build.cmd
205
206
 
206
207
  [testenv:coverage]
207
- basepython = {[base]basepython}
208
+ base_python = {[base]base_python}
208
209
  commands =
209
- {envpython} -m coverage erase
210
- -{envpython} -m coverage run -m tests {posargs}
211
- {envpython} -m coverage report
212
- {envpython} -m coverage html
210
+ {env_python} -m coverage erase
211
+ -{env_python} -m coverage run -m tests {posargs}
212
+ {env_python} -m coverage report
213
+ {env_python} -m coverage html
213
214
  deps =
214
215
  {[testenv]deps}
215
- coverage>=7.6.1
216
+ coverage>=7.6.4
216
217
  covdefaults>=2.3.0
217
- diff-cover>=9.1.1
218
+ diff-cover>=9.2.0
218
219
 
219
220
  [testenv:docs]
220
- basepython = {[base]basepython}
221
+ base_python = {[base]base_python}
221
222
  commands =
222
- {envpython} -m sphinxlint --ignore .tox --ignore build --ignore dist
223
- #{envpython} -m sphinx.apidoc -f {envsitepackagesdir}/{[base]packagesubdir}
224
- {envpython} -m sphinx.cmd.build -W -a -b html -E ./docs ./build/docs/html
225
- {envpython} -m sphinx.cmd.build -W -a -b linkcheck ./docs ./build/docs/html
226
- {envpython} -m sphinx.cmd.build -W -a -b doctest ./docs ./build/docs/html
223
+ {env_python} -m sphinxlint --ignore .tox --ignore build --ignore dist
224
+ #{env_python} -m sphinx.apidoc -f {envsitepackagesdir}/{[base]package_subdir}
225
+ {env_python} -m sphinx.cmd.build -W -a -b html -E ./docs ./build/docs/html
226
+ {env_python} -m sphinx.cmd.build -W -a -b linkcheck ./docs ./build/docs/html
227
+ {env_python} -m sphinx.cmd.build -W -a -b doctest ./docs ./build/docs/html
227
228
  extras = doc
228
229
  deps =
229
230
 
230
231
  [testenv:build]
231
- depends = py{38,39,310,311,312,313}, pypy{39,310}, docs
232
- basepython = {[base]basepython}
232
+ depends = py{39,310,311,312,313}, pypy{39,310}, docs
233
+ base_python = {[base]base_python}
233
234
  commands =
234
- {envpython} -W ignore -c "from setuptools import setup ; setup()" --quiet sdist --formats=zip
235
- {envpython} -W ignore -c "from setuptools import setup ; setup()" --quiet bdist_wheel
235
+ {env_python} -W ignore -c "from setuptools import setup ; setup()" --quiet sdist --formats=zip
236
+ {env_python} -W ignore -c "from setuptools import setup ; setup()" --quiet bdist_wheel
236
237
  # check out for PyPi
237
- {envpython} -m twine check dist/*
238
+ {env_python} -m twine check dist/*
238
239
  deps =
239
240
  {[testenv]deps}
240
241
  twine>=5.1.1
241
242
 
242
243
  [testenv:publish]
243
244
  depends = build
244
- basepython = {[base]basepython}
245
+ base_python = {[base]base_python}
245
246
  skip_install = true
246
247
  commands =
247
248
  # publish on PyPi
248
- {envpython} -m twine upload dist/*
249
+ {env_python} -m twine upload dist/*
249
250
  extras =
250
251
  deps =
251
252
  twine>=5.1.1
252
253
 
253
254
  [testenv:lint]
254
- basepython = {[base]basepython}
255
+ base_python = {[base]base_python}
255
256
  commands =
256
- {envpython} -m flake8 {envsitepackagesdir}/{[base]packagesubdir}/
257
+ {env_python} -m flake8 {envsitepackagesdir}/{[base]package_subdir}/
257
258
  extras =
258
259
  deps =
259
260
  {[testenv]deps}
@@ -2,4 +2,3 @@
2
2
  # SPDX-License-Identifier: Zlib
3
3
 
4
4
  __import__("_about", globals=globals(), level=1).about()
5
- __copyright__ = f"Copyright (c) 2020-2024 {__author__}" # noqa
@@ -7,7 +7,7 @@ __all__ = ('about', 'about_from_setup')
7
7
  def about(package=None):
8
8
  import sys
9
9
  from packaging.version import parse as parse_version
10
- from importlib.metadata import metadata as get_metadata
10
+ from importlib_metadata import metadata as get_metadata
11
11
  pkg_globals = sys._getframe(1).f_globals
12
12
  pkg_globals.pop("__builtins__", None)
13
13
  pkg_globals.pop("__cached__", None)
@@ -46,7 +46,7 @@ def about(package=None):
46
46
  __maintainer__ = metadata.get("Maintainer"),
47
47
  __maintainer_email__ = metadata.get("Maintainer-email"),
48
48
  __license__ = metadata.get("License"),
49
- __copyright__ = metadata.get("Copyright") # for now is None
49
+ __copyright__ = __get_copyright(metadata.get("Description"))
50
50
  )
51
51
 
52
52
  pkg_globals.update(pkg_metadata)
@@ -73,6 +73,7 @@ def about_from_setup(package_path=None):
73
73
  if package_path is None else Path(package_path))
74
74
  pyproject_path = package_path/"pyproject.toml"
75
75
  setup_cfg_path = package_path/"setup.cfg"
76
+ readme_path = package_path/"README.rst"
76
77
  metadata = {}
77
78
  if setup_cfg_path.exists():
78
79
  metadata.update(read_setupcfg(setup_cfg_path,
@@ -91,7 +92,8 @@ def about_from_setup(package_path=None):
91
92
  copyr_patt = re.compile(r"^\s*__copyright__\s*=\s*")
92
93
  about_py = package_path.glob("src/**/__about__.py")
93
94
  version = parse_version(metadata["version"])
94
- release_levels, get = __release_levels, __get
95
+ release_levels = __release_levels
96
+ get, get_copyright = __get, __get_copyright
95
97
 
96
98
  class about:
97
99
  __slots__ = ()
@@ -132,6 +134,8 @@ def about_from_setup(package_path=None):
132
134
  (next(about_py).open("rt", encoding="utf-8")
133
135
  if about_py else ())
134
136
  if copyr_patt.split(line)[1:]), "None"))
137
+ if __copyright__ is None and readme_path.exists():
138
+ __copyright__ = get_copyright(readme_path.read_text(encoding="utf-8"))
135
139
 
136
140
  pkg_globals["about"] = about
137
141
  pkg_globals.setdefault("__all__", [])
@@ -150,6 +154,29 @@ def __get(mdata, *keys):
150
154
  return mdata
151
155
 
152
156
 
157
+ def __get_copyright(description):
158
+ from docutils.core import publish_doctree
159
+ from docutils import nodes
160
+ copyr = None
161
+ if description is not None:
162
+ document = publish_doctree(description)
163
+ subst_name = document.substitution_names.get("copyright")
164
+ substitution = document.substitution_defs.get(subst_name)
165
+ if substitution is not None:
166
+ copyr = substitution.astext()
167
+ else:
168
+ # Try to get from 'License' section
169
+ section = document.ids.get(document.nameids.get("license"))
170
+ if section is not None:
171
+ lblock = section.next_node(nodes.line_block)
172
+ if lblock is not None:
173
+ copyr = next((line for _ in lblock.findall(nodes.line)
174
+ if ((line := _.astext().lstrip()).lower()
175
+ .startswith("copyright"))), None)
176
+ return copyr
177
+
178
+
179
+
153
180
  __release_levels = dict(
154
181
  a = "alpha",
155
182
  b = "beta",
@@ -1,18 +1,18 @@
1
1
  Metadata-Version: 2.1
2
- Name: pkg-about
3
- Version: 1.1.8
2
+ Name: pkg_about
3
+ Version: 1.2.2
4
4
  Summary: Shares Python package metadata at runtime.
5
5
  Author: Adam Karpierz
6
6
  Author-email: adam@karpierz.net
7
7
  Maintainer: Adam Karpierz
8
8
  Maintainer-email: adam@karpierz.net
9
9
  License: zlib/libpng License ; https://opensource.org/license/zlib
10
- Project-URL: Homepage, https://pypi.org/project/pkg-about/
10
+ Project-URL: Homepage, https://pypi.org/project/pkg_about/
11
11
  Project-URL: Documentation, https://pkg-about.readthedocs.io/
12
- Project-URL: Download, https://pypi.org/project/pkg-about/
13
- Project-URL: Source, https://github.com/karpierz/pkg-about
14
- Project-URL: Issues, https://github.com/karpierz/pkg-about/issues
15
- Keywords: pkg-about,pkg_about,__about__,packaging
12
+ Project-URL: Download, https://pypi.org/project/pkg_about/
13
+ Project-URL: Source, https://github.com/karpierz/pkg_about
14
+ Project-URL: Issues, https://github.com/karpierz/pkg_about/issues
15
+ Keywords: pkg_about,__about__,packaging
16
16
  Platform: any
17
17
  Classifier: Development Status :: 5 - Production/Stable
18
18
  Classifier: Intended Audience :: Developers
@@ -21,7 +21,6 @@ Classifier: Operating System :: OS Independent
21
21
  Classifier: Natural Language :: Polish
22
22
  Classifier: Programming Language :: Python
23
23
  Classifier: Programming Language :: Python :: 3
24
- Classifier: Programming Language :: Python :: 3.8
25
24
  Classifier: Programming Language :: Python :: 3.9
26
25
  Classifier: Programming Language :: Python :: 3.10
27
26
  Classifier: Programming Language :: Python :: 3.11
@@ -31,26 +30,28 @@ Classifier: Programming Language :: Python :: 3 :: Only
31
30
  Classifier: Programming Language :: Python :: Implementation :: CPython
32
31
  Classifier: Programming Language :: Python :: Implementation :: PyPy
33
32
  Classifier: Topic :: Software Development :: Libraries :: Python Modules
34
- Requires-Python: <4.0.0,>=3.8.10
33
+ Requires-Python: <4.0.0,>=3.9.0
35
34
  Description-Content-Type: text/x-rst; charset=UTF-8
36
35
  License-File: LICENSE
37
- Requires-Dist: setuptools>=72.2.0
36
+ Requires-Dist: setuptools>=75.3.0
38
37
  Requires-Dist: packaging>=24.1.0
39
- Requires-Dist: tomli>=2.0.1; python_version < "3.11"
38
+ Requires-Dist: importlib-metadata>=8.5.0
39
+ Requires-Dist: tomli>=2.0.2; python_version < "3.11"
40
+ Requires-Dist: docutils>=0.21.2
40
41
  Provides-Extra: doc
41
- Requires-Dist: Sphinx>=7.1.2; extra == "doc"
42
- Requires-Dist: sphinx-toolbox>=3.7.0; extra == "doc"
42
+ Requires-Dist: Sphinx>=7.4.7; extra == "doc"
43
+ Requires-Dist: sphinx-toolbox>=3.8.1; extra == "doc"
43
44
  Requires-Dist: sphinx-tabs>=3.4.5; extra == "doc"
44
45
  Requires-Dist: sphinx-copybutton>=0.5.2; extra == "doc"
45
46
  Requires-Dist: sphinxcontrib-spelling>=8.0.0; extra == "doc"
46
- Requires-Dist: sphinx-lint>=0.9.1; extra == "doc"
47
+ Requires-Dist: sphinx-lint>=1.0.0; extra == "doc"
47
48
  Requires-Dist: restructuredtext-lint>=1.4.0; extra == "doc"
48
- Requires-Dist: nbsphinx>=0.9.4; extra == "doc"
49
+ Requires-Dist: nbsphinx>=0.9.5; extra == "doc"
49
50
  Provides-Extra: test
50
- Requires-Dist: deepdiff>=7.0.1; extra == "test"
51
- Requires-Dist: rich>=13.7.1; extra == "test"
51
+ Requires-Dist: deepdiff>=8.0.1; extra == "test"
52
+ Requires-Dist: rich>=13.9.4; extra == "test"
52
53
 
53
- pkg-about
54
+ pkg_about
54
55
  =========
55
56
 
56
57
  Shares Python package metadata at runtime.
@@ -74,7 +75,7 @@ Installation
74
75
 
75
76
  Prerequisites:
76
77
 
77
- + Python 3.8 or higher
78
+ + Python 3.9 or higher
78
79
 
79
80
  * https://www.python.org/
80
81
 
@@ -123,7 +124,7 @@ or on development mode:
123
124
  License
124
125
  =======
125
126
 
126
- | Copyright (c) 2020-2024 Adam Karpierz
127
+ | |copyright|
127
128
  | Licensed under the zlib/libpng License
128
129
  | https://opensource.org/license/zlib
129
130
  | Please refer to the accompanying LICENSE file.
@@ -133,16 +134,31 @@ Authors
133
134
 
134
135
  * Adam Karpierz <adam@karpierz.net>
135
136
 
136
- .. |package| replace:: pkg-about
137
- .. |package_bold| replace:: **pkg-about**
138
- .. |respository| replace:: https://github.com/karpierz/pkg-about.git
139
- .. _Development page: https://github.com/karpierz/pkg-about
140
- .. _PyPI record: https://pypi.org/project/pkg-about/
137
+ .. |package| replace:: pkg_about
138
+ .. |package_bold| replace:: **pkg_about**
139
+ .. |copyright| replace:: Copyright (c) 2020-2024 Adam Karpierz
140
+ .. |respository| replace:: https://github.com/karpierz/pkg_about.git
141
+ .. _Development page: https://github.com/karpierz/pkg_about
142
+ .. _PyPI record: https://pypi.org/project/pkg_about/
141
143
  .. _Documentation: https://pkg-about.readthedocs.io/
142
144
 
143
145
  Changelog
144
146
  =========
145
147
 
148
+ 1.2.2 (2024-10-30)
149
+ ------------------
150
+ - Setup (dependencies) update.
151
+
152
+ 1.2.1 (2024-10-09)
153
+ ------------------
154
+ - Setup (dependencies) update.
155
+
156
+ 1.2.0 (2024-09-30)
157
+ ------------------
158
+ - Drop support for Python 3.8
159
+ - Ability to obtain __copyright__ from the README.rst content.
160
+ - Setup (dependencies) update.
161
+
146
162
  1.1.8 (2024-08-13)
147
163
  ------------------
148
164
  - Add support for Python 3.13
@@ -0,0 +1,21 @@
1
+ setuptools>=75.3.0
2
+ packaging>=24.1.0
3
+ importlib-metadata>=8.5.0
4
+ docutils>=0.21.2
5
+
6
+ [:python_version < "3.11"]
7
+ tomli>=2.0.2
8
+
9
+ [doc]
10
+ Sphinx>=7.4.7
11
+ sphinx-toolbox>=3.8.1
12
+ sphinx-tabs>=3.4.5
13
+ sphinx-copybutton>=0.5.2
14
+ sphinxcontrib-spelling>=8.0.0
15
+ sphinx-lint>=1.0.0
16
+ restructuredtext-lint>=1.4.0
17
+ nbsphinx>=0.9.5
18
+
19
+ [test]
20
+ deepdiff>=8.0.1
21
+ rich>=13.9.4
@@ -11,7 +11,7 @@ class MainTestCase(unittest.TestCase):
11
11
 
12
12
  @classmethod
13
13
  def setUpClass(cls):
14
- cls.version_expected = "1.1.8"
14
+ cls.version_expected = "1.2.2"
15
15
  version_parts = cls.version_expected.split(".")
16
16
  cls.version_major_expected = int(version_parts[0])
17
17
  cls.version_minor_expected = int(version_parts[1])
@@ -19,7 +19,7 @@ class MainTestCase(unittest.TestCase):
19
19
 
20
20
  def test_about(self):
21
21
  pkg_about.about("pkg_about")
22
- self.assertEqual(__title__, "pkg-about")
22
+ self.assertEqual(__title__, "pkg_about")
23
23
  self.assertEqual(__version__, self.version_expected)
24
24
  self.assertEqual(__version_info__.major, self.version_major_expected)
25
25
  self.assertEqual(__version_info__.minor, self.version_minor_expected)
@@ -27,7 +27,7 @@ class MainTestCase(unittest.TestCase):
27
27
  self.assertEqual(__version_info__.releaselevel, "final")
28
28
  self.assertEqual(__version_info__.serial, 0)
29
29
  self.assertEqual(__summary__, "Shares Python package metadata at runtime.")
30
- self.assertEqual(__uri__, "https://pypi.org/project/pkg-about/")
30
+ self.assertEqual(__uri__, "https://pypi.org/project/pkg_about/")
31
31
  self.assertEqual(__author__, "Adam Karpierz")
32
32
  self.assertEqual(__email__, "adam@karpierz.net")
33
33
  self.assertEqual(__author_email__, "adam@karpierz.net")
@@ -35,11 +35,11 @@ class MainTestCase(unittest.TestCase):
35
35
  self.assertEqual(__maintainer_email__, "adam@karpierz.net")
36
36
  self.assertEqual(__license__,
37
37
  "zlib/libpng License ; https://opensource.org/license/zlib")
38
- self.assertIsNone(__copyright__)
38
+ self.assertEqual(__copyright__, "Copyright (c) 2020-2024 Adam Karpierz")
39
39
 
40
40
  def test_about_from_setup(self):
41
41
  pkg_about.about_from_setup(Path(__file__).resolve().parent.parent)
42
- self.assertEqual(about.__title__, "pkg-about")
42
+ self.assertEqual(about.__title__, "pkg_about")
43
43
  self.assertEqual(about.__version__, self.version_expected)
44
44
  self.assertEqual(about.__version_info__.major, self.version_major_expected)
45
45
  self.assertEqual(about.__version_info__.minor, self.version_minor_expected)
@@ -47,7 +47,7 @@ class MainTestCase(unittest.TestCase):
47
47
  self.assertEqual(about.__version_info__.releaselevel, "final")
48
48
  self.assertEqual(about.__version_info__.serial, 0)
49
49
  self.assertEqual(about.__summary__, "Shares Python package metadata at runtime.")
50
- self.assertEqual(about.__uri__, "https://pypi.org/project/pkg-about/")
50
+ self.assertEqual(about.__uri__, "https://pypi.org/project/pkg_about/")
51
51
  self.assertEqual(about.__author__, "Adam Karpierz")
52
52
  self.assertEqual(about.__email__, "adam@karpierz.net")
53
53
  self.assertEqual(about.__author_email__, "adam@karpierz.net")
@@ -1,19 +0,0 @@
1
- setuptools>=72.2.0
2
- packaging>=24.1.0
3
-
4
- [:python_version < "3.11"]
5
- tomli>=2.0.1
6
-
7
- [doc]
8
- Sphinx>=7.1.2
9
- sphinx-toolbox>=3.7.0
10
- sphinx-tabs>=3.4.5
11
- sphinx-copybutton>=0.5.2
12
- sphinxcontrib-spelling>=8.0.0
13
- sphinx-lint>=0.9.1
14
- restructuredtext-lint>=1.4.0
15
- nbsphinx>=0.9.4
16
-
17
- [test]
18
- deepdiff>=7.0.1
19
- rich>=13.7.1
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes