You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
(``NameConvertor``) in pyp2rpm_. The main rule is that the RPM name for a PyPI package is
74
74
typically ``f"python3-{pypi_package_name}"``. The rare exceptions include packages that
75
-
primarily distribute an application, which drop the prefix, (e.g., the Black formatter
75
+
primarily distribute an application, which drop the prefix, (e.g. the Black formatter
76
76
is simply ``black``, not ``python3-black``), and variants for different Python versions
77
-
(e.g., in RHEL 9 ``setuptools`` can be found as ``python3-setuptools`` for Python 3.9,
77
+
(e.g. in RHEL 9 ``setuptools`` can be found as ``python3-setuptools`` for Python 3.9,
78
78
but ``python3.11-setuptools`` and ``python3.12-setuptools`` are also available). More details
79
79
are available in `Fedora's packaging guidelines for Python <https://docs.fedoraproject.org/en-US/packaging-guidelines/Python/#_naming>`__.
80
80
81
81
Debian packages typically follow a ``f"python3-{import_name}"`` naming scheme, with some
82
-
exceptions: some sub-communities have an infix (e.g., Django packages go under
82
+
exceptions: some sub-communities have an infix (e.g. Django packages go under
83
83
``f"python3-django-*"``), and applications are often distributed by their name, with no
84
84
``python3-`` prefix. Additional details are available in `Debian's Python Policy <https://www.debian.org/doc/packaging-manuals/python-policy/#module-package-names>`__.
85
85
86
86
Gentoo follows a similar approach to naming Python packages, using the ``dev-python/``
87
87
category and some `well-specified rules <https://projects.gentoo.org/python/guide/package-maintenance.html>`__.
88
88
89
89
Conda-forge has a more explicit name mapping, because the base names are the
90
-
same in conda-forge as on PyPI (e.g., ``numpy`` maps to ``numpy``), but there
91
-
are many exceptions because of both name collisions and renames (e.g., the PyPI
90
+
same in conda-forge as on PyPI (e.g. ``numpy`` maps to ``numpy``), but there
91
+
are many exceptions because of both name collisions and renames (e.g. the PyPI
92
92
name for PyTorch is ``torch`` while in conda-forge it's ``pytorch``). There are
93
93
several name mappings efforts maintained by different teams. Conda-forge's infrastructure
94
94
generates one in `regro/cf-graph-countyfair <https://github.com/regro/cf-graph-countyfair/tree/master/mappings/pypi>`__.
@@ -152,7 +152,7 @@ this could be made both more comprehensive and easier to maintain through a tool
152
152
command with semantics of *"show this ecosystem's preferred package manager
153
153
install command for all external dependencies"*. This may be done as a
154
154
standalone tool, or as a new subcommand in any Python development workflow tool
155
-
(e.g., Pip, Poetry, Hatch, PDM, uv).
155
+
(e.g. Pip, Poetry, Hatch, PDM, uv).
156
156
157
157
To this end, each ecosystem mapping can provide a list of package managers
158
158
known to be compatible, with templated instructions on how to install and query installed
@@ -167,7 +167,7 @@ Registry design
167
167
The mapping infrastructure has been designed to present the following components and properties:
168
168
169
169
- A central registry of PEP 725 identifiers (DepURLs), including at least the
170
-
well-known generic and virtual identifiers considered canonical.
170
+
well-known ``generic`` and ``virtual`` identifiers considered canonical.
171
171
- A list of known ecosystems, where ecosystem maintainers can register their name mapping(s).
172
172
- A standardized schema that defines how mappings should be structured. Each mapping can
173
173
also provide programmatic details about how their supported package manager(s) work.
@@ -237,7 +237,7 @@ of dictionaries, in which each entry consists of:
237
237
238
238
- a dictionary with three keys (``build``, ``build_host``, ``run``). The values
239
239
MUST be a string or list of strings representing the ecosystem-specific package
240
-
identifiers as needed as build-, host- and runtime dependencies (see PEP 725 for
240
+
identifiers as needed as build-, host- and runtime dependencies (see :pep:`725` for
241
241
details on these definitions).
242
242
243
243
- for convenience, a string or a list of strings are also accepted as a
@@ -251,12 +251,12 @@ of dictionaries, in which each entry consists of:
251
251
field will be imported. Either ``specs`` or ``specs_from`` MUST be present.
252
252
253
253
- an optional ``urls`` field whose value MUST be a URL, a list of URLs, or a
254
-
dictionary that maps a string to a URL. This is useful to link to external
254
+
dictionary that maps a non-empty string to a URL. This is useful to link to external
255
255
resources that provide more information about the mapped packages.
256
256
257
-
The mappings SHOULD also specify another section ``package_managers``, reporting
257
+
The mappings MUST also specify another section ``package_managers``, reporting
258
258
which package managers are available in the ecosystem and how to use them. This field MUST
259
-
take a list of dictionaries, with each of them reporting the following fields:
259
+
take an empty list or a list of dictionaries, with each of them reporting the following fields:
260
260
261
261
- ``name`` (string), unique identifier for this package manager. Usually, the executable name.
262
262
@@ -266,21 +266,22 @@ take a list of dictionaries, with each of them reporting the following fields:
266
266
- ``install``, to generate install instructions. The exit code MUST be ``0`` on success.
267
267
268
268
- ``query``, to check whether a given package is already installed. If the package is
269
-
installed, the command MUST result in an exit code of ``0``. Otherwise, an exit code
270
-
of ``1`` SHOULD be used.
269
+
installed, the command MUST result in an exit code of ``0``. Otherwise, a non-zero exit code
270
+
MUST be returned.
271
271
272
-
- ``specifier_syntax``: instructions on how to map a subset of PEP 440 specifiers to
273
-
the target package manager. Three levels of support are offered: name-only, exact-version-only,
274
-
and version-range compatibility (with per-operator translations).
272
+
- ``specifier_syntax``: instructions on how to map a subset of PEP 440 specifiers (as determined
273
+
in PEP 725)to the target package manager. Three levels of support are offered: name-only,
274
+
exact-version-only, and version-range compatibility (with per-operator translations).
275
275
276
276
Each mapping MUST have a canonical URL for online retrieval, with the
277
277
filename following the rules described in the section below. These
278
278
mappings MAY also be packaged for offline distribution in each platform. The authors
279
-
recommend placing in the standard location for data artifacts in each operating
279
+
recommend placing them in the standard location for data artifacts in each operating
280
280
system; e.g. ``$XDG_DATA_DIRS`` on Linux and others, ``~/Library/Application Support`` on
281
281
macOS, and ``%LOCALAPPDATA%`` for Windows. The subdirectory identifier MUST
282
282
be ``external-packaging-metadata-mappings``. This data directory SHOULD only
283
-
contain mapping documents named ``{ecosystem-identifier}.mapping.json``. The central
283
+
contain mapping documents named ``{ecosystem-identifier}.mapping.json`` (see section below
284
+
for details on the construction of ecosystem identifiers). The central
284
285
registry and known ecosystem documents MAY also be distributed in this directory,
285
286
as ``registry.json`` and ``known-ecosystems.json``, respectively.
286
287
@@ -447,7 +448,7 @@ The known ecosystems list is specified by the following
447
448
* - Type
448
449
- ``string``
449
450
* - Description
450
-
- URL of the mappings schema in use for the document.
451
+
- URL of the schema in use for the document.
451
452
* - Required
452
453
- False
453
454
@@ -459,6 +460,8 @@ The known ecosystems list is specified by the following
459
460
460
461
* - Type
461
462
- ``integer``
463
+
* - Description
464
+
- Version of the schema in use.
462
465
* - Required
463
466
- False
464
467
@@ -486,7 +489,7 @@ to a sub-dictionary defined as:
486
489
- Value type
487
490
- Value description
488
491
- Required
489
-
* - ``Literal['mapping']``
492
+
* - ``mapping``
490
493
- ``AnyURL``
491
494
- URL to the mapping for this ecosystem
492
495
- True
@@ -518,6 +521,8 @@ The mappings are specified by the following
518
521
519
522
* - Type
520
523
- ``integer``
524
+
* - Description
525
+
- Version of the schema in use.
521
526
* - Required
522
527
- False
523
528
@@ -530,7 +535,7 @@ The mappings are specified by the following
530
535
* - Type
531
536
- ``string``
532
537
* - Description
533
-
- Name of the schema
538
+
- Name of the schema.
534
539
* - Required
535
540
- True
536
541
@@ -541,7 +546,7 @@ The mappings are specified by the following
541
546
:widths: 25 75
542
547
543
548
* - Type
544
-
- ``string | None``
549
+
- ``string``
545
550
* - Description
546
551
- Free-form field to add information this mapping. Allows
547
552
Markdown.
@@ -573,7 +578,7 @@ Each entry in this list is defined as:
or periodic notifications via issues or draft submissions.
1162
1170
1163
-
Establishing the initial mapping is likely to involve a lot of work, but ideally the maintenance on an ongoing basis effort should require smaller effort.
1171
+
Establishing the initial mapping is likely to involve a lot of work, but ideally
1172
+
the maintenance on an ongoing basis effort should require smaller effort.
1164
1173
1165
1174
As best practices are discovered and agreed on, they should get documented
1166
1175
in the central registry repository as learning materials for the mapping
@@ -1188,15 +1197,15 @@ true if the user only relies on wheels, since the only impact will be driven by
1188
1197
external runtime dependencies (expected to be rare), and even in those cases
1189
1198
they need to opt-in by installing a compatible tool.
1190
1199
1191
-
Users that do opt-in may find missing entries in for their target ecosystems, for
1200
+
Users that do opt-in may find missing entries for their target ecosystems, for
1192
1201
which they should obtain informative error messages that point to the relevant
1193
1202
documentation sections. This will allow them to get acquainted with the nature
1194
1203
of the issue and its potential solutions.
1195
1204
1196
1205
We hope that this results in a subset of them reporting the missing entries,
1197
1206
submitting a fix to the affected mapping or, if totally absent, even deciding
1198
1207
to maintain a new one on their own. To that end, they should get familiar with
1199
-
the responsibilties of mapping maintainers (discussed above).
1208
+
the responsibilities of mapping maintainers (discussed above).
1200
1209
1201
1210
Reference Implementation
1202
1211
========================
@@ -1261,7 +1270,7 @@ The reasons include:
1261
1270
where that extra metadata can be obtained (e.g. the repository at the URL will likely
1262
1271
include details about authorship and licensing).
1263
1272
- These details can also be obtained from the actual target ecosystems. In some
1264
-
cases this might even be preferable; e.g.,for licenses, where downstream packaging
1273
+
cases this might even be preferable; e.g. for licenses, where downstream packaging
1265
1274
can actually affect it by unvendoring dependencies or adjusting optional bits.
1266
1275
- Those details may change over the lifetime of the project, and keeping them
1267
1276
up-to-date would increase the maintenance burden on the governance body.
@@ -1342,8 +1351,8 @@ values. The authors have decided to not add this feature given the implied compl
1342
1351
the following alternatives are proposed:
1343
1352
1344
1353
- For mapping authors, automate the generation of derived mappings via scripting and
1345
-
cronjobs. For example, simple logic such as fetching the parent mapping, applying the
1346
-
necesary modifications and republishing it to the target location should not result
1354
+
cron jobs. For example, simple logic such as fetching the parent mapping, applying the
1355
+
necessary modifications and republishing it to the target location should not result
1347
1356
in much maintenance burden.
1348
1357
1349
1358
- For end-users wishing to extend a given mapping with custom overrides, client-side
0 commit comments