77msgstr ""
88"Project-Id-Version: Python Packaging User Guide\n"
99"Report-Msgid-Bugs-To: \n"
10- "POT-Creation-Date: 2024-08-15 14:12 +0000\n"
10+ "POT-Creation-Date: 2024-08-24 00:21 +0000\n"
1111"PO-Revision-Date: 2024-01-18 07:31+0000\n"
1212"Last-Translator: Youcef Guenaoua <
[email protected] >\n"
1313"Language-Team: Arabic <https://hosted.weblate.org/projects/pypa/packaging-"
@@ -484,6 +484,7 @@ msgid "Deploying Python applications"
484484msgstr ""
485485
486486#: ../source/discussions/deploying-python-applications.rst:0
487+ #: ../source/discussions/single-source-version.rst:0
487488#: ../source/guides/distributing-packages-using-setuptools.rst:0
488489#: ../source/guides/index-mirrors-and-caches.rst:0
489490#: ../source/guides/installing-using-linux-tools.rst:0
@@ -503,6 +504,7 @@ msgid "Incomplete"
503504msgstr ""
504505
505506#: ../source/discussions/deploying-python-applications.rst:0
507+ #: ../source/discussions/single-source-version.rst:0
506508#: ../source/guides/distributing-packages-using-setuptools.rst:0
507509#: ../source/guides/index-mirrors-and-caches.rst:0
508510#: ../source/guides/installing-using-linux-tools.rst:0
@@ -1677,6 +1679,119 @@ msgstr ""
16771679msgid ":doc:`setuptools:deprecated/commands`"
16781680msgstr ""
16791681
1682+ #: ../source/discussions/single-source-version.rst:5
1683+ msgid "Single-sourcing the Project Version"
1684+ msgstr ""
1685+
1686+ #: ../source/discussions/single-source-version.rst:7
1687+ msgid "Complete"
1688+ msgstr ""
1689+
1690+ #: ../source/discussions/single-source-version.rst:8
1691+ msgid "2024-08-24"
1692+ msgstr ""
1693+
1694+ #: ../source/discussions/single-source-version.rst:10
1695+ msgid ""
1696+ "One of the challenges in building packages is that the version string can be "
1697+ "required in multiple places."
1698+ msgstr ""
1699+
1700+ #: ../source/discussions/single-source-version.rst:13
1701+ msgid ""
1702+ "It needs to be specified when building the package (e.g. in :file:`pyproject."
1703+ "toml`)"
1704+ msgstr ""
1705+
1706+ #: ../source/discussions/single-source-version.rst:13
1707+ msgid ""
1708+ "This will make it available in the installed package’s metadata, from where "
1709+ "it will be accessible at runtime using ``importlib.metadata."
1710+ "version(\"distribution_name\")``."
1711+ msgstr ""
1712+
1713+ #: ../source/discussions/single-source-version.rst:15
1714+ msgid ""
1715+ "A package may set a module attribute (e.g., ``__version__``) to provide an "
1716+ "alternative means of runtime access to the version of the imported package. "
1717+ "If this is done, the value of the attribute and that used by the build "
1718+ "system to set the distribution's version should be kept in sync in :ref:`the "
1719+ "build systems's recommended way <Build system version handling>`."
1720+ msgstr ""
1721+
1722+ #: ../source/discussions/single-source-version.rst:17
1723+ msgid ""
1724+ "If the code is in in a version control system (VCS), e.g. Git, the version "
1725+ "may appear in a *tag* such as ``v1.2.3``."
1726+ msgstr ""
1727+
1728+ #: ../source/discussions/single-source-version.rst:19
1729+ msgid ""
1730+ "To ensure that version numbers do not get out of sync, it is recommended "
1731+ "that there is a single source of truth for the version number."
1732+ msgstr ""
1733+
1734+ #: ../source/discussions/single-source-version.rst:21
1735+ msgid "In general, the options are:"
1736+ msgstr ""
1737+
1738+ #: ../source/discussions/single-source-version.rst:23
1739+ msgid ""
1740+ "If the code is in a version control system (VCS), e.g. Git, then the version "
1741+ "can be extracted from the VCS."
1742+ msgstr ""
1743+
1744+ #: ../source/discussions/single-source-version.rst:25
1745+ msgid ""
1746+ "The version can be hard-coded into the :file:`pyproject.toml` file -- and "
1747+ "the build system can copy it into other locations it may be required."
1748+ msgstr ""
1749+
1750+ #: ../source/discussions/single-source-version.rst:27
1751+ msgid ""
1752+ "The version string can be hard-coded into the source code -- either in a "
1753+ "special purpose file, such as :file:`_version.txt`, or as a attribute in a "
1754+ "module, such as :file:`__init__.py`, and the build system can extract it at "
1755+ "build time."
1756+ msgstr ""
1757+
1758+ #: ../source/discussions/single-source-version.rst:30
1759+ msgid "Consult your build system's documentation for their recommended method."
1760+ msgstr ""
1761+
1762+ #: ../source/discussions/single-source-version.rst:35
1763+ msgid "Build System Version Handling"
1764+ msgstr ""
1765+
1766+ #: ../source/discussions/single-source-version.rst:37
1767+ msgid ""
1768+ "The following are links to some build system's documentation for handling "
1769+ "version strings."
1770+ msgstr ""
1771+
1772+ #: ../source/discussions/single-source-version.rst:39
1773+ msgid "`Flit <https://flit.pypa.io/en/stable/>`_"
1774+ msgstr ""
1775+
1776+ #: ../source/discussions/single-source-version.rst:41
1777+ msgid "`Hatchling <https://hatch.pypa.io/1.9/version/>`_"
1778+ msgstr ""
1779+
1780+ #: ../source/discussions/single-source-version.rst:43
1781+ msgid ""
1782+ "`PDM <https://pdm-project.org/en/latest/reference/pep621/#__tabbed_1_2>`_"
1783+ msgstr ""
1784+
1785+ #: ../source/discussions/single-source-version.rst:45
1786+ msgid ""
1787+ "`Setuptools <https://setuptools.pypa.io/en/latest/userguide/pyproject_config."
1788+ "html#dynamic-metadata>`_"
1789+ msgstr ""
1790+
1791+ #: ../source/discussions/single-source-version.rst:47
1792+ msgid "`setuptools_scm <https://setuptools-scm.readthedocs.io/en/latest/>`_"
1793+ msgstr ""
1794+
16801795#: ../source/discussions/src-layout-vs-flat-layout.rst:5
16811796msgid "src layout vs flat layout"
16821797msgstr ""
@@ -6872,6 +6987,25 @@ msgid ""
68726987"cpp_extension_modules.html>`_"
68736988msgstr ""
68746989
6990+ #: ../source/guides/packaging-binary-extensions.rst:408
6991+ msgid "Additional considerations for binary wheels"
6992+ msgstr ""
6993+
6994+ #: ../source/guides/packaging-binary-extensions.rst:410
6995+ msgid ""
6996+ "The `pypackaging-native <https://pypackaging-native.github.io/>`_ website "
6997+ "has additional coverage of packaging Python packages with native code. It "
6998+ "aims to provide an overview of the most important packaging issues for such "
6999+ "projects, with in-depth explanations and references."
7000+ msgstr ""
7001+
7002+ #: ../source/guides/packaging-binary-extensions.rst:415
7003+ msgid ""
7004+ "Examples of topics covered are non-Python compiled dependencies (\"native "
7005+ "dependencies\"), the importance of the ABI (Application Binary Interface) of "
7006+ "native code, dependency on SIMD code and cross compilation."
7007+ msgstr ""
7008+
68757009#: ../source/guides/packaging-namespace-packages.rst:5
68767010msgid "Packaging namespace packages"
68777011msgstr ""
@@ -8451,25 +8585,27 @@ msgstr ""
84518585
84528586#: ../source/guides/writing-pyproject-toml.rst:25
84538587msgid ""
8454- "There is a significant difference between the ``[build-system]`` and "
8455- "``[project]`` tables. The former should always be present, regardless of "
8456- "which build backend you use (since it *defines* the tool you use). The "
8457- "latter is understood by *most* build backends, but some build backends use a "
8458- "different format."
8588+ "The ``[build-system]`` table should always be present, regardless of which "
8589+ "build backend you use (``[build-system]`` *defines* the build tool you use)."
8590+ msgstr ""
8591+
8592+ #: ../source/guides/writing-pyproject-toml.rst:29
8593+ msgid ""
8594+ "On the other hand, the ``[project]`` table is understood by *most* build "
8595+ "backends, but some build backends use a different format."
84598596msgstr ""
84608597
8461- #: ../source/guides/writing-pyproject-toml.rst:31
8598+ #: ../source/guides/writing-pyproject-toml.rst:32
84628599msgid ""
8463- "At the time of writing this (November 2023), Poetry_ is a notable build "
8464- "backend that does not use the ``[project]`` table (it uses the ``[tool."
8465- "poetry]`` table instead)."
8600+ "As of August 2024, Poetry_ is a notable build backend that does not use the "
8601+ "``[project]`` table, it uses the ``[tool.poetry]`` table instead. Also, the "
8602+ "setuptools_ build backend supports both the ``[project]`` table, and the "
8603+ "older format in ``setup.cfg`` or ``setup.py``."
84668604msgstr ""
84678605
8468- #: ../source/guides/writing-pyproject-toml.rst:35
8606+ #: ../source/guides/writing-pyproject-toml.rst:37
84698607msgid ""
8470- "Also, the setuptools_ build backend supports both the ``[project]`` table, "
8471- "and the older format in ``setup.cfg`` or ``setup.py``. For new projects, it "
8472- "is recommended to use the ``[project]`` table, and keep ``setup.py`` only if "
8608+ "For new projects, use the ``[project]`` table, and keep ``setup.py`` only if "
84738609"some programmatic configuration is needed (such as building C extensions), "
84748610"but the ``setup.cfg`` and ``setup.py`` formats are still valid. See :ref:"
84758611"`setup-py-deprecated`."
@@ -8544,7 +8680,7 @@ msgstr ""
85448680
85458681#: ../source/guides/writing-pyproject-toml.rst:133
85468682msgid ""
8547- "The project name must consists of ASCII letters, digits, underscores "
8683+ "The project name must consist of ASCII letters, digits, underscores "
85488684"\"``_``\", hyphens \"``-``\" and periods \"``.``\". It must not start or end "
85498685"with an underscore, hyphen or period."
85508686msgstr ""
0 commit comments