Skip to content

Commit d1aa0ab

Browse files
authored
Merge pull request #181 from OZI-Project/metadata-2.3
feat: deprecate ``home-page`` and ``download-url`` keys
2 parents 8cd4e88 + be7fe27 commit d1aa0ab

File tree

4 files changed

+15
-7
lines changed

4 files changed

+15
-7
lines changed

doc/pyproject.md

+2
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ of your package to show on PyPI. This should be written in reStructuredText
7575

7676
### `home-page`
7777

78+
:::{deprecated} 1.12.0:::
7879
A string containing the URL for the package's home page.
7980

8081
Example:
@@ -83,6 +84,7 @@ Example:
8384

8485
### `download-url`
8586

87+
:::{deprecated} 1.12.0:::
8688
A string containing the URL for the package's source, will replace '{version}' with the current version.
8789

8890
### `dynamic`

ozi_build/metadata.py

+8-4
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ def get_optional_dependencies(config):
148148
return res
149149

150150

151-
def get_simple_headers(config):
151+
def get_simple_headers(config): # noqa: C901
152152
res = ''
153153
for key in [
154154
'summary',
@@ -160,6 +160,10 @@ def get_simple_headers(config):
160160
'license',
161161
]:
162162
if key in config:
163+
if key == 'home-page':
164+
log.warning(
165+
'pyproject.toml:tools.ozi-build.metadata.home-page is deprecated since OZI.build 1.12, removal recommended.'
166+
)
163167
res += '{}: {}\n'.format(key.capitalize(), config[key])
164168
for key, mdata_key in [
165169
('provides', 'Provides-Dist'),
@@ -197,12 +201,12 @@ def get_license_headers(config):
197201
def get_download_url_headers(config):
198202
res = ''
199203
if 'download-url' in config:
204+
log.warning(
205+
'pyproject.toml:tools.ozi-build.metadata.download-url is deprecated since OZI.build 1.12, removal recommended.'
206+
)
200207
if '{version}' in config['download-url']:
201208
res += f'Download-URL: {config["download-url"].replace("{version}", config["version"])}\n'
202209
else:
203-
log.warning(
204-
'pyproject.toml:tools.ozi-build.metadata.download-url missing {version} replace pattern'
205-
)
206210
res += f'Download-URL: {config["download-url"]}\n'
207211
return res
208212

ozi_build/schema.py

+4-2
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,16 @@
2424
(`.rst`, `.md` or `.txt`)."""
2525
},
2626
"home-page": {
27-
"description": """A string containing the URL for the package's home page.
27+
"description": """:::{deprecated} 1.12.0:::
28+
A string containing the URL for the package's home page.
2829
2930
Example:
3031
3132
`http://www.example.com/~cschultz/bvote/`"""
3233
},
3334
"download-url": {
34-
"description": """A string containing the URL for the package's source, will replace '{version}' with the current version."""
35+
"description": """:::{deprecated} 1.12.0:::
36+
A string containing the URL for the package's source, will replace '{version}' with the current version."""
3537
},
3638
"dynamic": {
3739
"description": """A list of other headers to be treated as dynamic fields."""

pyproject.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ build-backend = "ozi_build.buildapi"
2424

2525
[tool.ozi-build.metadata]
2626
summary = "Create pep517 compliant packages from the meson build system, OZI-maintained fork."
27-
home-page = "https://oziproject.dev"
2827
author = "Thibault Saunier"
2928
author-email = "tsaunier@gnome.org"
3029
description-file = "README.rst"
@@ -44,6 +43,7 @@ classifiers = [
4443
project-urls=[
4544
'Bug Tracker, https://github.com/OZI-Project/OZI.build/issues',
4645
'Documentation, https://build.oziproject.dev/',
46+
'Homepage, https://oziproject.dev/',
4747
]
4848
pure-python-abi="py3-none"
4949

0 commit comments

Comments
 (0)