|
| 1 | +# SOME DESCRIPTIVE TITLE. |
| 2 | +# Copyright (C) 2001-2021, Python Software Foundation |
| 3 | +# This file is distributed under the same license as the Python package. |
| 4 | +# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. |
| 5 | +# |
| 6 | +# Translators: |
| 7 | +# m_aciek <[email protected]>, 2021 |
| 8 | +# |
| 9 | +#, fuzzy |
| 10 | +msgid "" |
| 11 | +msgstr "" |
| 12 | +"Project-Id-Version: Python 3.10\n" |
| 13 | +"Report-Msgid-Bugs-To: \n" |
| 14 | +"POT-Creation-Date: 2021-06-29 12:56+0000\n" |
| 15 | +"PO-Revision-Date: 2021-06-28 00:51+0000\n" |
| 16 | +" Last-Translator: m_aciek <[email protected]>, 2021\n" |
| 17 | +"Language-Team: Polish (https://www.transifex.com/python-doc/teams/5390/pl/)\n" |
| 18 | +"MIME-Version: 1.0\n" |
| 19 | +"Content-Type: text/plain; charset=UTF-8\n" |
| 20 | +"Content-Transfer-Encoding: 8bit\n" |
| 21 | +"Language: pl\n" |
| 22 | +"Plural-Forms: nplurals=4; plural=(n==1 ? 0 : (n%10>=2 && n%10<=4) && (n" |
| 23 | +"%100<12 || n%100>14) ? 1 : n!=1 && (n%10>=0 && n%10<=1) || (n%10>=5 && n" |
| 24 | +"%10<=9) || (n%100>=12 && n%100<=14) ? 2 : 3);\n" |
| 25 | + |
| 26 | +msgid "Distutils Examples" |
| 27 | +msgstr "" |
| 28 | + |
| 29 | +msgid "" |
| 30 | +"This document is being retained solely until the ``setuptools`` " |
| 31 | +"documentation at https://setuptools.readthedocs.io/en/latest/setuptools.html " |
| 32 | +"independently covers all of the relevant information currently included here." |
| 33 | +msgstr "" |
| 34 | +"Ten dokument jest przechowywany wyłącznie do czasu, gdy dokumentacja " |
| 35 | +"``setuptools`` pod adresem https://setuptools.readthedocs.io/en/latest/" |
| 36 | +"setuptools.html niezależnie obejmie wszystkie istotne informacje, które są " |
| 37 | +"tutaj zawarte." |
| 38 | + |
| 39 | +msgid "" |
| 40 | +"This chapter provides a number of basic examples to help get started with " |
| 41 | +"distutils. Additional information about using distutils can be found in the " |
| 42 | +"Distutils Cookbook." |
| 43 | +msgstr "" |
| 44 | + |
| 45 | +msgid "`Distutils Cookbook <https://wiki.python.org/moin/Distutils/Cookbook>`_" |
| 46 | +msgstr "" |
| 47 | + |
| 48 | +msgid "" |
| 49 | +"Collection of recipes showing how to achieve more control over distutils." |
| 50 | +msgstr "" |
| 51 | + |
| 52 | +msgid "Pure Python distribution (by module)" |
| 53 | +msgstr "" |
| 54 | + |
| 55 | +msgid "" |
| 56 | +"If you're just distributing a couple of modules, especially if they don't " |
| 57 | +"live in a particular package, you can specify them individually using the " |
| 58 | +"``py_modules`` option in the setup script." |
| 59 | +msgstr "" |
| 60 | + |
| 61 | +msgid "" |
| 62 | +"In the simplest case, you'll have two files to worry about: a setup script " |
| 63 | +"and the single module you're distributing, :file:`foo.py` in this example::" |
| 64 | +msgstr "" |
| 65 | + |
| 66 | +msgid "" |
| 67 | +"(In all diagrams in this section, *<root>* will refer to the distribution " |
| 68 | +"root directory.) A minimal setup script to describe this situation would " |
| 69 | +"be::" |
| 70 | +msgstr "" |
| 71 | + |
| 72 | +msgid "" |
| 73 | +"Note that the name of the distribution is specified independently with the " |
| 74 | +"``name`` option, and there's no rule that says it has to be the same as the " |
| 75 | +"name of the sole module in the distribution (although that's probably a good " |
| 76 | +"convention to follow). However, the distribution name is used to generate " |
| 77 | +"filenames, so you should stick to letters, digits, underscores, and hyphens." |
| 78 | +msgstr "" |
| 79 | + |
| 80 | +msgid "" |
| 81 | +"Since ``py_modules`` is a list, you can of course specify multiple modules, " |
| 82 | +"eg. if you're distributing modules :mod:`foo` and :mod:`bar`, your setup " |
| 83 | +"might look like this::" |
| 84 | +msgstr "" |
| 85 | + |
| 86 | +msgid "and the setup script might be ::" |
| 87 | +msgstr "" |
| 88 | + |
| 89 | +msgid "" |
| 90 | +"You can put module source files into another directory, but if you have " |
| 91 | +"enough modules to do that, it's probably easier to specify modules by " |
| 92 | +"package rather than listing them individually." |
| 93 | +msgstr "" |
| 94 | + |
| 95 | +msgid "Pure Python distribution (by package)" |
| 96 | +msgstr "" |
| 97 | + |
| 98 | +msgid "" |
| 99 | +"If you have more than a couple of modules to distribute, especially if they " |
| 100 | +"are in multiple packages, it's probably easier to specify whole packages " |
| 101 | +"rather than individual modules. This works even if your modules are not in " |
| 102 | +"a package; you can just tell the Distutils to process modules from the root " |
| 103 | +"package, and that works the same as any other package (except that you don't " |
| 104 | +"have to have an :file:`__init__.py` file)." |
| 105 | +msgstr "" |
| 106 | + |
| 107 | +msgid "The setup script from the last example could also be written as ::" |
| 108 | +msgstr "" |
| 109 | + |
| 110 | +msgid "(The empty string stands for the root package.)" |
| 111 | +msgstr "" |
| 112 | + |
| 113 | +msgid "" |
| 114 | +"If those two files are moved into a subdirectory, but remain in the root " |
| 115 | +"package, e.g.::" |
| 116 | +msgstr "" |
| 117 | + |
| 118 | +msgid "" |
| 119 | +"then you would still specify the root package, but you have to tell the " |
| 120 | +"Distutils where source files in the root package live::" |
| 121 | +msgstr "" |
| 122 | + |
| 123 | +msgid "" |
| 124 | +"More typically, though, you will want to distribute multiple modules in the " |
| 125 | +"same package (or in sub-packages). For example, if the :mod:`foo` and :mod:" |
| 126 | +"`bar` modules belong in package :mod:`foobar`, one way to layout your source " |
| 127 | +"tree is ::" |
| 128 | +msgstr "" |
| 129 | + |
| 130 | +msgid "" |
| 131 | +"This is in fact the default layout expected by the Distutils, and the one " |
| 132 | +"that requires the least work to describe in your setup script::" |
| 133 | +msgstr "" |
| 134 | + |
| 135 | +msgid "" |
| 136 | +"If you want to put modules in directories not named for their package, then " |
| 137 | +"you need to use the ``package_dir`` option again. For example, if the :file:" |
| 138 | +"`src` directory holds modules in the :mod:`foobar` package::" |
| 139 | +msgstr "" |
| 140 | + |
| 141 | +msgid "an appropriate setup script would be ::" |
| 142 | +msgstr "" |
| 143 | + |
| 144 | +msgid "" |
| 145 | +"Or, you might put modules from your main package right in the distribution " |
| 146 | +"root::" |
| 147 | +msgstr "" |
| 148 | + |
| 149 | +msgid "in which case your setup script would be ::" |
| 150 | +msgstr "" |
| 151 | + |
| 152 | +msgid "(The empty string also stands for the current directory.)" |
| 153 | +msgstr "" |
| 154 | + |
| 155 | +msgid "" |
| 156 | +"If you have sub-packages, they must be explicitly listed in ``packages``, " |
| 157 | +"but any entries in ``package_dir`` automatically extend to sub-packages. (In " |
| 158 | +"other words, the Distutils does *not* scan your source tree, trying to " |
| 159 | +"figure out which directories correspond to Python packages by looking for :" |
| 160 | +"file:`__init__.py` files.) Thus, if the default layout grows a sub-package::" |
| 161 | +msgstr "" |
| 162 | + |
| 163 | +msgid "then the corresponding setup script would be ::" |
| 164 | +msgstr "" |
| 165 | + |
| 166 | +msgid "Single extension module" |
| 167 | +msgstr "" |
| 168 | + |
| 169 | +msgid "" |
| 170 | +"Extension modules are specified using the ``ext_modules`` option. " |
| 171 | +"``package_dir`` has no effect on where extension source files are found; it " |
| 172 | +"only affects the source for pure Python modules. The simplest case, a " |
| 173 | +"single extension module in a single C source file, is::" |
| 174 | +msgstr "" |
| 175 | + |
| 176 | +msgid "" |
| 177 | +"If the :mod:`foo` extension belongs in the root package, the setup script " |
| 178 | +"for this could be ::" |
| 179 | +msgstr "" |
| 180 | + |
| 181 | +msgid "If the extension actually belongs in a package, say :mod:`foopkg`, then" |
| 182 | +msgstr "" |
| 183 | + |
| 184 | +msgid "" |
| 185 | +"With exactly the same source tree layout, this extension can be put in the :" |
| 186 | +"mod:`foopkg` package simply by changing the name of the extension::" |
| 187 | +msgstr "" |
| 188 | + |
| 189 | +msgid "Checking a package" |
| 190 | +msgstr "" |
| 191 | + |
| 192 | +msgid "" |
| 193 | +"The ``check`` command allows you to verify if your package meta-data meet " |
| 194 | +"the minimum requirements to build a distribution." |
| 195 | +msgstr "" |
| 196 | + |
| 197 | +msgid "" |
| 198 | +"To run it, just call it using your :file:`setup.py` script. If something is " |
| 199 | +"missing, ``check`` will display a warning." |
| 200 | +msgstr "" |
| 201 | + |
| 202 | +msgid "Let's take an example with a simple script::" |
| 203 | +msgstr "" |
| 204 | + |
| 205 | +msgid "Running the ``check`` command will display some warnings:" |
| 206 | +msgstr "" |
| 207 | + |
| 208 | +msgid "" |
| 209 | +"If you use the reStructuredText syntax in the ``long_description`` field and " |
| 210 | +"`docutils`_ is installed you can check if the syntax is fine with the " |
| 211 | +"``check`` command, using the ``restructuredtext`` option." |
| 212 | +msgstr "" |
| 213 | + |
| 214 | +msgid "For example, if the :file:`setup.py` script is changed like this::" |
| 215 | +msgstr "" |
| 216 | + |
| 217 | +msgid "" |
| 218 | +"Where the long description is broken, ``check`` will be able to detect it by " |
| 219 | +"using the :mod:`docutils` parser:" |
| 220 | +msgstr "" |
| 221 | + |
| 222 | +msgid "Reading the metadata" |
| 223 | +msgstr "" |
| 224 | + |
| 225 | +msgid "" |
| 226 | +"The :func:`distutils.core.setup` function provides a command-line interface " |
| 227 | +"that allows you to query the metadata fields of a project through the " |
| 228 | +"``setup.py`` script of a given project:" |
| 229 | +msgstr "" |
| 230 | + |
| 231 | +msgid "" |
| 232 | +"This call reads the ``name`` metadata by running the :func:`distutils.core." |
| 233 | +"setup` function. Although, when a source or binary distribution is created " |
| 234 | +"with Distutils, the metadata fields are written in a static file called :" |
| 235 | +"file:`PKG-INFO`. When a Distutils-based project is installed in Python, the :" |
| 236 | +"file:`PKG-INFO` file is copied alongside the modules and packages of the " |
| 237 | +"distribution under :file:`NAME-VERSION-pyX.X.egg-info`, where ``NAME`` is " |
| 238 | +"the name of the project, ``VERSION`` its version as defined in the Metadata, " |
| 239 | +"and ``pyX.X`` the major and minor version of Python like ``2.7`` or ``3.2``." |
| 240 | +msgstr "" |
| 241 | + |
| 242 | +msgid "" |
| 243 | +"You can read back this static file, by using the :class:`distutils.dist." |
| 244 | +"DistributionMetadata` class and its :func:`read_pkg_file` method::" |
| 245 | +msgstr "" |
| 246 | + |
| 247 | +msgid "" |
| 248 | +"Notice that the class can also be instantiated with a metadata file path to " |
| 249 | +"loads its values::" |
| 250 | +msgstr "" |
0 commit comments