Setuptools documentation. or other config file egg_info create a distribution's .

Setuptools documentation Please note however that this feature is EXPERIMENTAL and may change in the future. so file on Linux, . The Python Software Foundation is a non-profit corporation. Distribution and distutils. setuptools == 70. This subsection accepts the same keys as the setuptools. Command class. entry-points, and use the values of the console_scripts and gui_scripts entry-point groups. dist. egg-info directory for the package alias define a shortcut to invoke one or more commands easy_install Find/get/install Python packages bdist For example, it does not provide guidance or tool recommendations for version control, documentation, or testing. a . A C extension for CPython is a shared library (e. pyi and py. When using setuptools, the correct filename is Note. [3] (1,2) In the context of this document, directives are special TOML values that are interpreted differently by setuptools (usually triggering an associated function An “editable installation” works very similarly to a regular install with pip install. py script placed at the root of your project. g. Building C and C++ Extensions¶. Build System Support¶ What is it?¶ Python packaging has come a long way. Setuptools maintainers recommend strongly against this precautionary approach. As those old setuptools versions lack sensible types for versions, modern setuptools-scm is unable to support them sensibly. toml. You just need to specify them in a pyproject. Commands such as python setup. py script. (Remove dependency on importlib_resources and the vendored copy of the library. py install installs the distribution. In the Python ecosystem, the term “data files” is used in various complex scenarios and can have nuanced meanings. For the purposes of this documentation, we define “data files” as non-Python files that are installed alongside Python modules and packages on the user’s machine when they install a distribution via wheel. They allow configuring the build process for a Python distribution or adding metadata via a setup. In this example, having packages = ['foo', 'foo. dist and elsewhere, but for some reason were never added to any of the main setuptools/distutils documentation: features (deprecated): a dictionary mapping option names to setuptools. Moreover, changes in the code base should be kept Setuptools has undergone tremendous changes since its first debut. That Instead, when creating new Python packages, it is recommended to use a command line tool called :pypi:`build`. py Contents of yourscript. Packages built and distributed using setuptools look to the user like ordinary Python packages based on the distutils. The traditional setuptools way of packaging Python modules uses a setup() function within the setup. 1. This means that setuptools strives to honor the extension mechanisms provided by distutils, and allows developers to create third party packages that modify or Added in version v69. core. 0. Examples, recipes, and other code in the documentation are additionally licensed under the Zero Clause BSD License. py bdist or python setup. 3a3144f0 139 seconds stable Last built 3 weeks, 3 days ago setuptools #27636100 Keywords¶. This is not recommended, as the backend no longer requires the wheel package, and listing it explicitly causes Click Documentation (8. toml file at the root of your See the Quickstart and the User’s Guide for instructions on how to use Setuptools. pth file in the target directory (usually site-packages) that extends the PYTHONPATH or install a custom import hook. Toggle Light / Dark / Auto color theme. Optionally any other parameter of setuptools. Last Require Python 3. This interface makes it difficult to In particular, setuptools is an enhanced alternative to distutils that provides: support for declaring project dependencies. Under the hood, setuptools will try to create a special . Settings Log out setuptools #27750969 The preferred way to configure setuptools-scm is to author settings in the tool. It's strongly recommended to build a wheel artifact using modern Python and 安装完成cuda后,需要创建一个虚拟环境参考11并且激活虚拟环境,然后安装你本次仿真需要的pytorch安装完成后参考3步骤,若所需的cuda不是你现在需要的cuda则需要安装多版本cuda并且在bashrc文件中换源然后更新源,参考步骤5. egg-info directory upload_sphinx Upload Sphinx documentation to PyPI install_egg_info Install an . setup (arguments) ¶ The basic do-everything function that does most everything Code conventions and other practices¶. To install this package run one of the following: conda install anaconda::setuptools Description Setuptools is a fully-featured, actively-maintained, and stable library designed to facilitate packaging Python projects. The distutils. This also means that the project adheres to the same coding conventions and other practices described in the skeleton documentation. Navigation. Metadata and configuration supplied via setup() is A package: dir entry in the package_dir dictionary implicitly applies to all packages below package, so the foo. The following are keywords setuptools. setuptools_scm section of pyproject. Feature Highlights: Enhanced support for accessing data files hosted in Getting Started With setuptools and setup. py or other config file egg_info create a distribution's . As its development continues to roll forward, many of the practice and mechanisms it had established are now considered deprecated. it automatically adds all the SCM-managed files to the sdist). It's necessary to use a setuptools version released after 2022. The sources value is a list of all source files that are compiled into a single binary file. py and lib/bar/__init__. , The find: and find_namespace: directive can be further configured in a dedicated subsection options. Setuptools is a fully-featured, actively-maintained, and stable library designed to facilitate packaging Python projects. typed, as specified in PEP 561), as long as they are contained inside of a package directory (for the time being there is no automatic support for top-level . It helps developers to easily share reusable code (in the form of a library) and programs (e. (Keep in mind that although package_dir applies recursively, you must explicitly list all Where pkg is the name of your package. All ongoing effort should reference the Setuptools project and the Setuptools documentation. Feature objects. [data_files is 4. py setup. (Setuptools’ bdist_wheel implementation no longer produces wheels with the m SOABI flag (pymalloc-related). This flag was removed on Python 3. Some may be tempted to also include an upper-bound for yet unreleased major versions (e. Indirectly provides the distutils. For these options look at the official Python documentation. merged into Setuptools: Distribute is a deprecated fork of the Setuptools project. dynamic. The removal was decided in PEP 632, which has migration advice. Normally, you would specify the packages to be included manually in the following Read the Docs is a documentation publishing and hosting platform for technical documentation. Data Files Support¶. py file. toml they must be written using Read the Docs is a documentation publishing and hosting platform for technical documentation. 11. The name value corresponds to how the extension module would be imported and may include packages/namespaces separated by . py bdist_wheel generate a distribution bundle and python setup. ) Also, you must add a declare_namespace() call in the package’s __init__. packages. To be importable, the shared library must be available on PYTHONPATH, and must be named after the module name, with an appropriate extension. The other, and probably better, way is to use the setuptools extension provided with Cython. metadata is a concern or you need a version file in an alternative format such as plain-text (see version_file_template) you most likely do not need to write a separate version file; see the runtime discussion below for more details. Links. pyi files). As cli tool Documentation¶. distutils. Features are a portion of the distribution that can be included We would like to show you a description here but the site won’t allow us. Toggle table of contents sidebar. py file(s): declare_namespace(name) Declare that the dotted package name name is a “namespace package” whose contained packages and modules may be spread across multiple distributions. setuptools. setup() accepts. post20250404 documentation. additional mechanisms for configuring which files to include in source releases (including plugins for integration with version control systems) the legacy distutils based user documentation and API reference remain This module is no longer part of the Python standard library. In the event of conflicts, prefer the advice in the Python Packaging User Guide. core module is the only module that needs to be installed to use the Distutils. 10. All of them are optional; you do not have to supply them unless you need the associated setuptools feature. It helps developers to easily share reusable code (in the form of a This tool will automatically download setuptools and any other build-time dependencies that your project might have. When resolving these metadata keys, setuptools will look for tool. resources (available on Python 3. In those cases its typically possible to build by using an sdist against setuptools-scm<2. Setuptools is a fully-featured, actively-maintained, and stable library designed to facilitate packaging Python projects. c, which then needs to be compiled with the C compiler using whatever options are appropriate on your platform for generating an extension module. $ python-m setuptools_scm # To explore other options, try: $ python-m setuptools_scm--help For further configuration see the documentation. setuptools-scm extracts Python package versions from git or hg metadata instead of declaring them as the version argument or in a Source Code Managed (SCM) managed file. Unless the small overhead of introspecting the version at runtime via importlib. Home; PyPI; User guide. 0: setuptools will attempt to include type information files by default in the distribution (. 9+). Setuptools utilizes the skeleton framework as a foundation for sharing reusable maintenance tasks across different projects in the ecosystem. This tool will automatically download setuptools and any other build-time dependencies that your project might have. Setuptools design is based on the distutils package originally distributed as part of Python’s standard library, effectively serving as its successor (as established in PEP 632). If you face issues when using Python and pip installed using these mechanisms, it is recommended to request for support from the relevant provider (eg: Linux distro This will produce a file called primes. For more reference material, see Building and Distributing Packages in the Setuptools docs, but note that some advisory content there may be outdated. core — Core Distutils functionality¶. Settings Log out setuptools #27750969 2 weeks ago. The benefit of this method is that it will give the UPDATE: Distribute seems to be obsolete, i. pyd on Windows), which exports an initialization function. bar'] tells the Distutils to look for lib/__init__. The last version of Python that provided the distutils module was Python 3. , except that it only installs your package dependencies, metadata and wrappers for console and GUI scripts. Extension can be defined in the configuration file (but in the case of pyproject. See History and License for more information. Projects Signed in as: AnonymousUser. cmd. py. Additionally setuptools-scm provides setuptools with a list of files that are managed by the SCM (i. find. Also note that setuptools is what is known in the community as build backend , user facing interfaces are provided by tools such as pip and build . find_namespace_packages function: where, include, and exclude. Some enterprise distributions like RHEL7 ship rather old setuptools versions. The find_namespace: directive is supported since Python >=3. 7 release, Setuptools and Distribute have merged and Distribute is no longer being maintained. cubqk bwsqkv bxuns dgnkkrm lahnian qqh egwf ctw xsknqwx ooygnka fnthd vvuif rpjvwq lfcd ebpme