[ Web Proxy ]
URL:
Viewing: https://raw.githubusercontent.com/python-doc-ja/python-docs-pt-br/temp/distutils/setupscript.po [Back]  [Original]

# SOME DESCRIPTIVE TITLE.
# Copyright (C) 2001-2021, Python Software Foundation
# This file is distributed under the same license as the Python package.
# FIRST AUTHOR , YEAR.
#
# Translators:
# Rafael Fontenelle , 2021
# Marco Rougeth , 2021
# Claudio Rogerio Carvalho Filho , 2021
# (Douglas da Silva) , 2021
# Misael borges , 2021
# Danilo Lima , 2021
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: Python 3.10\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2021-06-29 12:56+0000\n"
"PO-Revision-Date: 2021-06-28 00:51+0000\n"
"Last-Translator: Danilo Lima , 2021\n"
"Language-Team: Portuguese (Brazil) (https://www.transifex.com/python-doc/"
"teams/5390/pt_BR/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: pt_BR\n"
"Plural-Forms: nplurals=2; plural=(n > 1);\n"

#: ../../distutils/setupscript.rst:5
msgid "Writing the Setup Script"
msgstr "Escrevendo o Script de Configurao"

#: ../../distutils/_setuptools_disclaimer.rst:3
msgid ""
"This document is being retained solely until the ``setuptools`` "
"documentation at https://setuptools.readthedocs.io/en/latest/setuptools.html "
"independently covers all of the relevant information currently included here."
msgstr ""
"Este documento est sendo mantido apenas at que a documentao do "
"``setuptools`` em https://setuptools.readthedocs.io/en/latest/setuptools."
"html cubra independentemente todas as informaes relevantes atualmente "
"includas aqui."

#: ../../distutils/setupscript.rst:9
msgid ""
"The setup script is the centre of all activity in building, distributing, "
"and installing modules using the Distutils.  The main purpose of the setup "
"script is to describe your module distribution to the Distutils, so that the "
"various commands that operate on your modules do the right thing.  As we saw "
"in section :ref:`distutils-simple-example` above, the setup script consists "
"mainly of a call to :func:`setup`, and most information supplied to the "
"Distutils by the module developer is supplied as keyword arguments to :func:"
"`setup`."
msgstr ""

#: ../../distutils/setupscript.rst:17
msgid ""
"Here's a slightly more involved example, which we'll follow for the next "
"couple of sections: the Distutils' own setup script.  (Keep in mind that "
"although the Distutils are included with Python 1.6 and later, they also "
"have an independent existence so that Python 1.5.2 users can use them to "
"install other module distributions.  The Distutils' own setup script, shown "
"here, is used to install the package into Python 1.5.2.) ::"
msgstr ""

#: ../../distutils/setupscript.rst:37
msgid ""
"There are only two differences between this and the trivial one-file "
"distribution presented in section :ref:`distutils-simple-example`: more "
"metadata, and the specification of pure Python modules by package, rather "
"than by module.  This is important since the Distutils consist of a couple "
"of dozen modules split into (so far) two packages; an explicit list of every "
"module would be tedious to generate and difficult to maintain.  For more "
"information on the additional meta-data, see section :ref:`meta-data`."
msgstr ""

#: ../../distutils/setupscript.rst:45
msgid ""
"Note that any pathnames (files or directories) supplied in the setup script "
"should be written using the Unix convention, i.e. slash-separated.  The "
"Distutils will take care of converting this platform-neutral representation "
"into whatever is appropriate on your current platform before actually using "
"the pathname.  This makes your setup script portable across operating "
"systems, which of course is one of the major goals of the Distutils.  In "
"this spirit, all pathnames in this document are slash-separated."
msgstr ""

#: ../../distutils/setupscript.rst:53
msgid ""
"This, of course, only applies to pathnames given to Distutils functions.  If "
"you, for example, use standard Python functions such as :func:`glob.glob` "
"or :func:`os.listdir` to specify files, you should be careful to write "
"portable code instead of hardcoding path separators::"
msgstr ""

#: ../../distutils/setupscript.rst:65
msgid "Listing whole packages"
msgstr ""

#: ../../distutils/setupscript.rst:67
msgid ""
"The ``packages`` option tells the Distutils to process (build, distribute, "
"install, etc.) all pure Python modules found in each package mentioned in "
"the ``packages`` list.  In order to do this, of course, there has to be a "
"correspondence between package names and directories in the filesystem.  The "
"default correspondence is the most obvious one, i.e. package :mod:"
"`distutils` is found in the directory :file:`distutils` relative to the "
"distribution root. Thus, when you say ``packages = ['foo']`` in your setup "
"script, you are promising that the Distutils will find a file :file:`foo/"
"__init__.py` (which might be spelled differently on your system, but you get "
"the idea) relative to the directory where your setup script lives.  If you "
"break this promise, the Distutils will issue a warning but still process the "
"broken package anyway."
msgstr ""

#: ../../distutils/setupscript.rst:79
msgid ""
"If you use a different convention to lay out your source directory, that's "
"no problem: you just have to supply the ``package_dir`` option to tell the "
"Distutils about your convention.  For example, say you keep all Python "
"source under :file:`lib`, so that modules in the \"root package\" (i.e., not "
"in any package at all) are in :file:`lib`, modules in the :mod:`foo` package "
"are in :file:`lib/foo`, and so forth.  Then you would put ::"
msgstr ""

#: ../../distutils/setupscript.rst:88
msgid ""
"in your setup script.  The keys to this dictionary are package names, and an "
"empty package name stands for the root package.  The values are directory "
"names relative to your distribution root.  In this case, when you say "
"``packages = ['foo']``, you are promising that the file :file:`lib/foo/"
"__init__.py` exists."
msgstr ""

#: ../../distutils/setupscript.rst:93
msgid ""
"Another possible convention is to put the :mod:`foo` package right in :file:"
"`lib`, the :mod:`foo.bar` package in :file:`lib/bar`, etc.  This would be "
"written in the setup script as ::"
msgstr ""

#: ../../distutils/setupscript.rst:99
msgid ""
"A ``package: dir`` entry in the ``package_dir`` dictionary implicitly "
"applies to all packages below *package*, so the :mod:`foo.bar` case is "
"automatically handled here.  In this example, having ``packages = ['foo', "
"'foo.bar']`` tells the Distutils to look for :file:`lib/__init__.py` and :"
"file:`lib/bar/__init__.py`.  (Keep in mind that although ``package_dir`` "
"applies recursively, you must explicitly list all packages in ``packages``: "
"the Distutils will *not* recursively scan your source tree looking for any "
"directory with an :file:`__init__.py` file.)"
msgstr ""

#: ../../distutils/setupscript.rst:112
msgid "Listing individual modules"
msgstr ""

#: ../../distutils/setupscript.rst:114
msgid ""
"For a small module distribution, you might prefer to list all modules rather "
"than listing packages---especially the case of a single module that goes in "
"the \"root package\" (i.e., no package at all).  This simplest case was "
"shown in section :ref:`distutils-simple-example`; here is a slightly more "
"involved example::"
msgstr ""

#: ../../distutils/setupscript.rst:121
msgid ""
"This describes two modules, one of them in the \"root\" package, the other "
"in the :mod:`pkg` package.  Again, the default package/directory layout "
"implies that these two modules can be found in :file:`mod1.py` and :file:"
"`pkg/mod2.py`, and that :file:`pkg/__init__.py` exists as well. And again, "
"you can override the package/directory correspondence using the "
"``package_dir`` option."
msgstr ""

#: ../../distutils/setupscript.rst:131
msgid "Describing extension modules"
msgstr ""

#: ../../distutils/setupscript.rst:133
msgid ""
"Just as writing Python extension modules is a bit more complicated than "
"writing pure Python modules, describing them to the Distutils is a bit more "
"complicated. Unlike pure modules, it's not enough just to list modules or "
"packages and expect the Distutils to go out and find the right files; you "
"have to specify the extension name, source file(s), and any compile/link "
"requirements (include directories, libraries to link with, etc.)."
msgstr ""

#: ../../distutils/setupscript.rst:142
msgid ""
"All of this is done through another keyword argument to :func:`setup`, the "
"``ext_modules`` option.  ``ext_modules`` is just a list of :class:"
"`~distutils.core.Extension` instances, each of which describes a single "
"extension module. Suppose your distribution includes a single extension, "
"called :mod:`foo` and implemented by :file:`foo.c`.  If no additional "
"instructions to the compiler/linker are needed, describing this extension is "
"quite simple::"
msgstr ""

#: ../../distutils/setupscript.rst:152
msgid ""
"The :class:`Extension` class can be imported from :mod:`distutils.core` "
"along with :func:`setup`.  Thus, the setup script for a module distribution "
"that contains only this one extension and nothing else might be::"
msgstr ""

#: ../../distutils/setupscript.rst:162
msgid ""
"The :class:`Extension` class (actually, the underlying extension-building "
"machinery implemented by the :command:`build_ext` command) supports a great "
"deal of flexibility in describing Python extensions, which is explained in "
"the following sections."
msgstr ""

#: ../../distutils/setupscript.rst:169
msgid "Extension names and packages"
msgstr ""

#: ../../distutils/setupscript.rst:171
msgid ""
"The first argument to the :class:`~distutils.core.Extension` constructor is "
"always the name of the extension, including any package names.  For "
"example, ::"
msgstr ""

#: ../../distutils/setupscript.rst:176
msgid "describes an extension that lives in the root package, while ::"
msgstr ""

#: ../../distutils/setupscript.rst:180
msgid ""
"describes the same extension in the :mod:`pkg` package.  The source files "
"and resulting object code are identical in both cases; the only difference "
"is where in the filesystem (and therefore where in Python's namespace "
"hierarchy) the resulting extension lives."
msgstr ""

#: ../../distutils/setupscript.rst:185
msgid ""
"If you have a number of extensions all in the same package (or all under the "
"same base package), use the ``ext_package`` keyword argument to :func:"
"`setup`.  For example, ::"
msgstr ""

#: ../../distutils/setupscript.rst:195
msgid ""
"will compile :file:`foo.c` to the extension :mod:`pkg.foo`, and :file:`bar."
"c` to :mod:`pkg.subpkg.bar`."
msgstr ""

#: ../../distutils/setupscript.rst:200
msgid "Extension source files"
msgstr ""

#: ../../distutils/setupscript.rst:202
msgid ""
"The second argument to the :class:`~distutils.core.Extension` constructor is "
"a list of source files.  Since the Distutils currently only support C, C++, "
"and Objective-C extensions, these are normally C/C++/Objective-C source "
"files.  (Be sure to use appropriate extensions to distinguish C++ source "
"files: :file:`.cc` and :file:`.cpp` seem to be recognized by both Unix and "
"Windows compilers.)"
msgstr ""

#: ../../distutils/setupscript.rst:209
msgid ""
"However, you can also include SWIG interface (:file:`.i`) files in the list; "
"the :command:`build_ext` command knows how to deal with SWIG extensions: it "
"will run SWIG on the interface file and compile the resulting C/C++ file "
"into your extension."
msgstr ""

#: ../../distutils/setupscript.rst:216
msgid ""
"This warning notwithstanding, options to SWIG can be currently passed like "
"this::"
msgstr ""

#: ../../distutils/setupscript.rst:225
msgid "Or on the commandline like this::"
msgstr ""

#: ../../distutils/setupscript.rst:229
msgid ""
"On some platforms, you can include non-source files that are processed by "
"the compiler and included in your extension.  Currently, this just means "
"Windows message text (:file:`.mc`) files and resource definition (:file:`."
"rc`) files for Visual C++. These will be compiled to binary resource (:file:"
"`.res`) files and linked into the executable."
msgstr ""

#: ../../distutils/setupscript.rst:237
msgid "Preprocessor options"
msgstr "Opes do preprocessador"

#: ../../distutils/setupscript.rst:239
msgid ""
"Three optional arguments to :class:`~distutils.core.Extension` will help if "
"you need to specify include directories to search or preprocessor macros to "
"define/undefine: ``include_dirs``, ``define_macros``, and ``undef_macros``."
msgstr ""

#: ../../distutils/setupscript.rst:243
msgid ""
"For example, if your extension requires header files in the :file:`include` "
"directory under your distribution root, use the ``include_dirs`` option::"
msgstr ""

#: ../../distutils/setupscript.rst:248
msgid ""
"You can specify absolute directories there; if you know that your extension "
"will only be built on Unix systems with X11R6 installed to :file:`/usr`, you "
"can get away with ::"
msgstr ""

#: ../../distutils/setupscript.rst:254
msgid ""
"You should avoid this sort of non-portable usage if you plan to distribute "
"your code: it's probably better to write C code like  ::"
msgstr ""

#: ../../distutils/setupscript.rst:259
msgid ""
"If you need to include header files from some other Python extension, you "
"can take advantage of the fact that header files are installed in a "
"consistent way by the Distutils :command:`install_headers` command.  For "
"example, the Numerical Python header files are installed (on a standard Unix "
"installation) to :file:`/usr/local/include/python1.5/Numerical`. (The exact "
"location will differ according to your platform and Python installation.)  "
"Since the Python include directory---\\ :file:`/usr/local/include/python1.5` "
"in this case---is always included in the search path when building Python "
"extensions, the best approach is to write C code like  ::"
msgstr ""

#: ../../distutils/setupscript.rst:271
msgid ""
"If you must put the :file:`Numerical` include directory right into your "
"header search path, though, you can find that directory using the Distutils :"
"mod:`distutils.sysconfig` module::"
msgstr ""

#: ../../distutils/setupscript.rst:281
msgid ""
"Even though this is quite portable---it will work on any Python "
"installation, regardless of platform---it's probably easier to just write "
"your C code in the sensible way."
msgstr ""

#: ../../distutils/setupscript.rst:285
msgid ""
"You can define and undefine pre-processor macros with the ``define_macros`` "
"and ``undef_macros`` options. ``define_macros`` takes a list of ``(name, "
"value)`` tuples, where ``name`` is the name of the macro to define (a "
"string) and ``value`` is its value: either a string or ``None``.  (Defining "
"a macro ``FOO`` to ``None`` is the equivalent of a bare ``#define FOO`` in "
"your C source: with most compilers, this sets ``FOO`` to the string ``1``.)  "
"``undef_macros`` is just a list of macros to undefine."
msgstr ""

#: ../../distutils/setupscript.rst:293
msgid "For example::"
msgstr "Por exemplo::"

#: ../../distutils/setupscript.rst:300
msgid "is the equivalent of having this at the top of every C source file::"
msgstr ""

#: ../../distutils/setupscript.rst:309
msgid "Library options"
msgstr "Opes da Biblioteca"

#: ../../distutils/setupscript.rst:311
msgid ""
"You can also specify the libraries to link against when building your "
"extension, and the directories to search for those libraries.  The "
"``libraries`` option is a list of libraries to link against, "
"``library_dirs`` is a list of directories to search for libraries at  link-"
"time, and ``runtime_library_dirs`` is a list of directories to  search for "
"shared (dynamically loaded) libraries at run-time."
msgstr ""

#: ../../distutils/setupscript.rst:317
msgid ""
"For example, if you need to link against libraries known to be in the "
"standard library search path on target systems ::"
msgstr ""

#: ../../distutils/setupscript.rst:323
msgid ""
"If you need to link with libraries in a non-standard location, you'll have "
"to include the location in ``library_dirs``::"
msgstr ""

#: ../../distutils/setupscript.rst:330
msgid ""
"(Again, this sort of non-portable construct should be avoided if you intend "
"to distribute your code.)"
msgstr ""

#: ../../distutils/setupscript.rst:337
msgid "Other options"
msgstr "Outras opes"

#: ../../distutils/setupscript.rst:339
msgid ""
"There are still some other options which can be used to handle special cases."
msgstr ""

#: ../../distutils/setupscript.rst:341
msgid ""
"The ``optional`` option is a boolean; if it is true, a build failure in the "
"extension will not abort the build process, but instead simply not install "
"the failing extension."
msgstr ""

#: ../../distutils/setupscript.rst:345
msgid ""
"The ``extra_objects`` option is a list of object files to be passed to the "
"linker. These files must not have extensions, as the default extension for "
"the compiler is used."
msgstr ""

#: ../../distutils/setupscript.rst:349
msgid ""
"``extra_compile_args`` and ``extra_link_args`` can be used to specify "
"additional command line options for the respective compiler and linker "
"command lines."
msgstr ""

#: ../../distutils/setupscript.rst:353
msgid ""
"``export_symbols`` is only useful on Windows.  It can contain a list of "
"symbols (functions or variables) to be exported. This option is not needed "
"when building compiled extensions: Distutils  will automatically add "
"``initmodule`` to the list of exported symbols."
msgstr ""

#: ../../distutils/setupscript.rst:358
msgid ""
"The ``depends`` option is a list of files that the extension depends on (for "
"example header files). The build command will call the compiler on the "
"sources to rebuild extension if any on this files has been modified since "
"the previous build."
msgstr ""

#: ../../distutils/setupscript.rst:364
msgid "Relationships between Distributions and Packages"
msgstr ""

#: ../../distutils/setupscript.rst:366
msgid "A distribution may relate to packages in three specific ways:"
msgstr ""

#: ../../distutils/setupscript.rst:368
msgid "It can require packages or modules."
msgstr "Pode requerer pacotes ou mdulos."

#: ../../distutils/setupscript.rst:370
msgid "It can provide packages or modules."
msgstr "Pode fornecer pacotes ou mdulos."

#: ../../distutils/setupscript.rst:372
msgid "It can obsolete packages or modules."
msgstr "Isso pode ser pacotes ou mdulos obsoletos."

#: ../../distutils/setupscript.rst:374
msgid ""
"These relationships can be specified using keyword arguments to the :func:"
"`distutils.core.setup` function."
msgstr ""

#: ../../distutils/setupscript.rst:377
msgid ""
"Dependencies on other Python modules and packages can be specified by "
"supplying the *requires* keyword argument to :func:`setup`. The value must "
"be a list of strings.  Each string specifies a package that is required, and "
"optionally what versions are sufficient."
msgstr ""

#: ../../distutils/setupscript.rst:382
msgid ""
"To specify that any version of a module or package is required, the string "
"should consist entirely of the module or package name. Examples include "
"``'mymodule'`` and ``'xml.parsers.expat'``."
msgstr ""

#: ../../distutils/setupscript.rst:386
msgid ""
"If specific versions are required, a sequence of qualifiers can be supplied "
"in parentheses.  Each qualifier may consist of a comparison operator and a "
"version number.  The accepted comparison operators are::"
msgstr ""

#: ../../distutils/setupscript.rst:393
msgid ""
"These can be combined by using multiple qualifiers separated by commas (and "
"optional whitespace).  In this case, all of the qualifiers must be matched; "
"a logical AND is used to combine the evaluations."
msgstr ""

#: ../../distutils/setupscript.rst:397
msgid "Let's look at a bunch of examples:"
msgstr ""

#: ../../distutils/setupscript.rst:400
msgid "Requires Expression"
msgstr "Expresso Requerida"

#: ../../distutils/setupscript.rst:400 ../../distutils/setupscript.rst:418
msgid "Explanation"
msgstr "Explanao"

#: ../../distutils/setupscript.rst:402
msgid "``==1.0``"
msgstr "``==1.0``"

#: ../../distutils/setupscript.rst:402
msgid "Only version ``1.0`` is compatible"
msgstr ""

#: ../../distutils/setupscript.rst:404
msgid "``>1.0, !=1.5.1, 1.0, !=1.5.1, 

Web Proxy Viewer  |  New URL  |  Original Page