|
8 | 8 | msgstr "" |
9 | 9 | "Project-Id-Version: Python Packaging User Guide \n" |
10 | 10 | "Report-Msgid-Bugs-To: \n" |
11 | | -"POT-Creation-Date: 2024-02-29 18:41+0000\n" |
| 11 | +"POT-Creation-Date: 2024-02-29 18:58+0000\n" |
12 | 12 | "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" |
13 | 13 | "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" |
14 | 14 | "Language-Team: LANGUAGE <LL@li.org>\n" |
@@ -1891,7 +1891,7 @@ msgstr "" |
1891 | 1891 |
|
1892 | 1892 | #: ../source/guides/analyzing-pypi-package-downloads.rst:75 |
1893 | 1893 | #: ../source/specifications/dependency-specifiers.rst:29 |
1894 | | -#: ../source/specifications/direct-url-data-structure.rst:217 |
| 1894 | +#: ../source/specifications/direct-url-data-structure.rst:339 |
1895 | 1895 | #: ../source/specifications/version-specifiers.rst:1067 |
1896 | 1896 | msgid "Examples" |
1897 | 1897 | msgstr "" |
@@ -4811,82 +4811,82 @@ msgid "There are many techniques to maintain a single source of truth for the ve |
4811 | 4811 | msgstr "" |
4812 | 4812 |
|
4813 | 4813 | #: ../source/guides/single-sourcing-package-version.rst:12 |
4814 | | -msgid "Read the file in :file:`setup.py` and get the version. Example::" |
| 4814 | +msgid "Read the file in :file:`setup.py` and get the version. Example (from `pip setup.py <https://github.com/pypa/pip/blob/003c7ac/setup.py>`_)::" |
4815 | 4815 | msgstr "" |
4816 | 4816 |
|
4817 | | -#: ../source/guides/single-sourcing-package-version.rst:38 |
| 4817 | +#: ../source/guides/single-sourcing-package-version.rst:39 |
4818 | 4818 | msgid "As of the release of setuptools 46.4.0, one can accomplish the same thing by instead placing the following in the project's :file:`setup.cfg` file (replacing \"package\" with the import name of the package):" |
4819 | 4819 | msgstr "" |
4820 | 4820 |
|
4821 | | -#: ../source/guides/single-sourcing-package-version.rst:48 |
| 4821 | +#: ../source/guides/single-sourcing-package-version.rst:49 |
4822 | 4822 | msgid "As of the release of setuptools 61.0.0, one can specify the version dynamically in the project's :file:`pyproject.toml` file." |
4823 | 4823 | msgstr "" |
4824 | 4824 |
|
4825 | | -#: ../source/guides/single-sourcing-package-version.rst:60 |
| 4825 | +#: ../source/guides/single-sourcing-package-version.rst:61 |
4826 | 4826 | msgid "Please be aware that declarative config indicators, including the ``attr:`` directive, are not supported in parameters to :file:`setup.py`." |
4827 | 4827 | msgstr "" |
4828 | 4828 |
|
4829 | | -#: ../source/guides/single-sourcing-package-version.rst:64 |
| 4829 | +#: ../source/guides/single-sourcing-package-version.rst:65 |
4830 | 4830 | msgid "Use an external build tool that either manages updating both locations, or offers an API that both locations can use." |
4831 | 4831 | msgstr "" |
4832 | 4832 |
|
4833 | | -#: ../source/guides/single-sourcing-package-version.rst:67 |
| 4833 | +#: ../source/guides/single-sourcing-package-version.rst:68 |
4834 | 4834 | msgid "Few tools you could use, in no particular order, and not necessarily complete: `bump2version <https://pypi.org/project/bump2version>`_, `changes <https://pypi.org/project/changes>`_, `commitizen <https://pypi.org/project/commitizen>`_, `zest.releaser <https://pypi.org/project/zest.releaser>`_." |
4835 | 4835 | msgstr "" |
4836 | 4836 |
|
4837 | | -#: ../source/guides/single-sourcing-package-version.rst:74 |
| 4837 | +#: ../source/guides/single-sourcing-package-version.rst:75 |
4838 | 4838 | msgid "Set the value to a ``__version__`` global variable in a dedicated module in your project (e.g. :file:`version.py`), then have :file:`setup.py` read and ``exec`` the value into a variable." |
4839 | 4839 | msgstr "" |
4840 | 4840 |
|
4841 | | -#: ../source/guides/single-sourcing-package-version.rst:85 |
| 4841 | +#: ../source/guides/single-sourcing-package-version.rst:86 |
4842 | 4842 | msgid "Example using this technique: `warehouse <https://github.com/pypa/warehouse/blob/64ca42e42d5613c8339b3ec5e1cb7765c6b23083/warehouse/__about__.py>`_." |
4843 | 4843 | msgstr "" |
4844 | 4844 |
|
4845 | | -#: ../source/guides/single-sourcing-package-version.rst:87 |
| 4845 | +#: ../source/guides/single-sourcing-package-version.rst:88 |
4846 | 4846 | msgid "Place the value in a simple ``VERSION`` text file and have both :file:`setup.py` and the project code read it." |
4847 | 4847 | msgstr "" |
4848 | 4848 |
|
4849 | | -#: ../source/guides/single-sourcing-package-version.rst:95 |
| 4849 | +#: ../source/guides/single-sourcing-package-version.rst:96 |
4850 | 4850 | msgid "An advantage with this technique is that it's not specific to Python. Any tool can read the version." |
4851 | 4851 | msgstr "" |
4852 | 4852 |
|
4853 | | -#: ../source/guides/single-sourcing-package-version.rst:100 |
| 4853 | +#: ../source/guides/single-sourcing-package-version.rst:101 |
4854 | 4854 | msgid "With this approach you must make sure that the ``VERSION`` file is included in all your source and binary distributions (e.g. add ``include VERSION`` to your :file:`MANIFEST.in`)." |
4855 | 4855 | msgstr "" |
4856 | 4856 |
|
4857 | | -#: ../source/guides/single-sourcing-package-version.rst:104 |
| 4857 | +#: ../source/guides/single-sourcing-package-version.rst:105 |
4858 | 4858 | msgid "Set the value in :file:`setup.py`, and have the project code use the ``importlib.metadata`` API to fetch the value at runtime. (``importlib.metadata`` was introduced in Python 3.8 and is available to older versions as the ``importlib-metadata`` project.) An installed project's version can be fetched with the API as follows::" |
4859 | 4859 | msgstr "" |
4860 | 4860 |
|
4861 | | -#: ../source/guides/single-sourcing-package-version.rst:119 |
| 4861 | +#: ../source/guides/single-sourcing-package-version.rst:120 |
4862 | 4862 | msgid "Be aware that the ``importlib.metadata`` API only knows about what's in the installation metadata, which is not necessarily the code that's currently imported." |
4863 | 4863 | msgstr "" |
4864 | 4864 |
|
4865 | | -#: ../source/guides/single-sourcing-package-version.rst:123 |
| 4865 | +#: ../source/guides/single-sourcing-package-version.rst:124 |
4866 | 4866 | msgid "If a project uses this method to fetch its version at runtime, then its ``install_requires`` value needs to be edited to install ``importlib-metadata`` on pre-3.8 versions of Python like so::" |
4867 | 4867 | msgstr "" |
4868 | 4868 |
|
4869 | | -#: ../source/guides/single-sourcing-package-version.rst:137 |
| 4869 | +#: ../source/guides/single-sourcing-package-version.rst:138 |
4870 | 4870 | msgid "An older (and less efficient) alternative to ``importlib.metadata`` is the ``pkg_resources`` API provided by ``setuptools``::" |
4871 | 4871 | msgstr "" |
4872 | 4872 |
|
4873 | | -#: ../source/guides/single-sourcing-package-version.rst:143 |
| 4873 | +#: ../source/guides/single-sourcing-package-version.rst:144 |
4874 | 4874 | msgid "If a project uses ``pkg_resources`` to fetch its own version at runtime, then ``setuptools`` must be added to the project's ``install_requires`` list." |
4875 | 4875 | msgstr "" |
4876 | 4876 |
|
4877 | | -#: ../source/guides/single-sourcing-package-version.rst:147 |
| 4877 | +#: ../source/guides/single-sourcing-package-version.rst:148 |
4878 | 4878 | msgid "Example using this technique: `setuptools <https://github.com/pypa/setuptools/blob/main/setuptools/version.py>`_." |
4879 | 4879 | msgstr "" |
4880 | 4880 |
|
4881 | | -#: ../source/guides/single-sourcing-package-version.rst:150 |
| 4881 | +#: ../source/guides/single-sourcing-package-version.rst:151 |
4882 | 4882 | msgid "Set the value to ``__version__`` in ``sample/__init__.py`` and import ``sample`` in :file:`setup.py`." |
4883 | 4883 | msgstr "" |
4884 | 4884 |
|
4885 | | -#: ../source/guides/single-sourcing-package-version.rst:164 |
| 4885 | +#: ../source/guides/single-sourcing-package-version.rst:165 |
4886 | 4886 | msgid "Although this technique is common, beware that it will fail if ``sample/__init__.py`` imports packages from ``install_requires`` dependencies, which will very likely not be installed yet when :file:`setup.py` is run." |
4887 | 4887 | msgstr "" |
4888 | 4888 |
|
4889 | | -#: ../source/guides/single-sourcing-package-version.rst:170 |
| 4889 | +#: ../source/guides/single-sourcing-package-version.rst:171 |
4890 | 4890 | msgid "Keep the version number in the tags of a version control system (Git, Mercurial, etc) instead of in the code, and automatically extract it from there using `setuptools_scm <https://pypi.org/project/setuptools-scm/>`_." |
4891 | 4891 | msgstr "" |
4892 | 4892 |
|
@@ -8024,7 +8024,7 @@ msgstr "" |
8024 | 8024 | #: ../source/specifications/binary-distribution-format.rst:419 |
8025 | 8025 | #: ../source/specifications/core-metadata.rst:848 |
8026 | 8026 | #: ../source/specifications/dependency-specifiers.rst:476 |
8027 | | -#: ../source/specifications/direct-url-data-structure.rst:267 |
| 8027 | +#: ../source/specifications/direct-url-data-structure.rst:389 |
8028 | 8028 | #: ../source/specifications/direct-url.rst:67 |
8029 | 8029 | #: ../source/specifications/entry-points.rst:164 |
8030 | 8030 | #: ../source/specifications/externally-managed-environments.rst:472 |
@@ -9395,27 +9395,35 @@ msgstr "" |
9395 | 9395 | msgid "Since Subversion does not support globally unique identifiers, this field is the Subversion revision number in the corresponding repository." |
9396 | 9396 | msgstr "" |
9397 | 9397 |
|
| 9398 | +#: ../source/specifications/direct-url-data-structure.rst:217 |
| 9399 | +msgid "JSON Schema" |
| 9400 | +msgstr "" |
| 9401 | + |
9398 | 9402 | #: ../source/specifications/direct-url-data-structure.rst:219 |
| 9403 | +msgid "The following JSON Schema can be used to validate the contents of ``direct_url.json``:" |
| 9404 | +msgstr "" |
| 9405 | + |
| 9406 | +#: ../source/specifications/direct-url-data-structure.rst:341 |
9399 | 9407 | msgid "Source archive:" |
9400 | 9408 | msgstr "" |
9401 | 9409 |
|
9402 | | -#: ../source/specifications/direct-url-data-structure.rst:232 |
| 9410 | +#: ../source/specifications/direct-url-data-structure.rst:354 |
9403 | 9411 | msgid "Git URL with tag and commit-hash:" |
9404 | 9412 | msgstr "" |
9405 | 9413 |
|
9406 | | -#: ../source/specifications/direct-url-data-structure.rst:245 |
| 9414 | +#: ../source/specifications/direct-url-data-structure.rst:367 |
9407 | 9415 | msgid "Local directory:" |
9408 | 9416 | msgstr "" |
9409 | 9417 |
|
9410 | | -#: ../source/specifications/direct-url-data-structure.rst:254 |
| 9418 | +#: ../source/specifications/direct-url-data-structure.rst:376 |
9411 | 9419 | msgid "Local directory in editable mode:" |
9412 | 9420 | msgstr "" |
9413 | 9421 |
|
9414 | | -#: ../source/specifications/direct-url-data-structure.rst:269 |
| 9422 | +#: ../source/specifications/direct-url-data-structure.rst:391 |
9415 | 9423 | msgid "March 2020: This specification was approved through :pep:`610`, defining the ``direct_url.json`` metadata file." |
9416 | 9424 | msgstr "" |
9417 | 9425 |
|
9418 | | -#: ../source/specifications/direct-url-data-structure.rst:271 |
| 9426 | +#: ../source/specifications/direct-url-data-structure.rst:393 |
9419 | 9427 | msgid "January 2023: Added the ``archive_info.hashes`` key (`discussion <archive-info-hashes_>`_)." |
9420 | 9428 | msgstr "" |
9421 | 9429 |
|
|
0 commit comments