• Home
  • Raw
  • Download

Lines Matching +full:build +full:- +full:packages

10     pip install --upgrade setuptools
16 only provide backend support, no longer being the de-facto packaging tool in
18 the backend (build system) it wants to use. The distribution can then
19 be generated with whatever tool that provides a ``build sdist``-like
22 change is driven under :pep:`PEP 517 <517#build-requirements>`. To learn more about Python packagin…
23 navigate to the :ref:`bottom <packaging-resources>` of this page.
32 .. code-block:: toml
34 [build-system]
36 build-backend = "setuptools.build_meta"
49 .. code-block:: ini
56 packages = mypackage
59 importlib-metadata; python_version < "3.8"
65 .. code-block:: python
72 packages=['mypackage'],
75 'importlib-metadata; python_version == "3.8"',
83 .. code-block:: toml
90 'importlib-metadata; python_version<"3.8"',
102 Then, you need a builder, such as :std:doc:`PyPA build <pypa-build:index>`
103 which you can obtain via ``pip install build``. After downloading it, invoke
106 python -m build
121 For simple projects, it's usually easy enough to manually add packages to
122 the ``packages`` keyword in ``setup.cfg``. However, for very large projects,
125 the packages in your project directory:
129 .. code-block:: ini
132 packages = find: # OR `find_namespaces:` if you want to use namespaces
134 [options.packages.find] (always `find` even if `find_namespaces:` was used before)
143 .. code-block:: python
149 packages=find_packages(
159 .. code-block:: toml
162 [tool.setuptools.packages]
166 [tool.setuptools.packages.find]
174 here as the package resides in the current directory) and filters the packages
176 those that match the ``exclude`` and returns a list of Python packages. The above
183 :ref:`flat-layout` and :ref:`src-layout`) without requiring any
194 <PyPUG:specifications/entry-points>`.
196 to type ``python -m pip install``.
201 .. code-block:: ini
205 cli-name = mypkg.mymodule:some_func
209 .. code-block:: python
215 'cli-name = mypkg.mymodule:some_func',
222 .. code-block:: toml
225 cli-name = mypkg.mymodule:some_func
227 When this project is installed, a ``cli-name`` executable will be created.
228 ``cli-name`` will invoke the function ``some_func`` in the
230 Note that you can also use the ``entry-points`` mechanism to advertise
231 components between installed packages and implement plugin systems.
237 Packages built with ``setuptools`` can specify dependencies to be automatically
243 .. code-block:: ini
252 .. code-block:: python
262 .. code-block:: toml
275 (see :doc:`PyPUG:specifications/version-specifiers` for more information).
290 are placed in a platform-specific location. Setuptools offers three ways to
291 specify data files to be included in your packages. For the simplest use, you
296 .. code-block:: ini
303 .. code-block:: python
313 .. code-block:: toml
316 include-package-data = true
318 # pyproject.toml to configure your build.
319 # You can deactivate that with `include-package-data = false`
321 This tells setuptools to install any data files it finds in your packages.
332 to your interpreter directory (e.g. the ``site-packages`` directory).
337 pip install --editable .
344 Prior to :ref:`pip v21.1 <pip:v21-1>`, a ``setup.py`` script was
346 versions of pip, ``setup.cfg``-only projects may be installed in this mode.
355 .. code-block:: python
370 <PyPUG:tutorials/packaging-projects>`.
376 into a full-fledged ``setup.cfg`` to declare your package information instead
382 .. _packaging-resources:
388 up-to-date references that can help you when it is time to distribute your work.
392 .. _MANIFEST.in: https://packaging.python.org/en/latest/guides/using-manifest-in/
395 ----
401 build is necessary.
403 contributing to existing packages that use ``setup.py``.
410 While the ``[build-system]`` table should always be specified in the
411 ``pyproject.toml`` file, support for adding package metadata and build configuration