### Example INSTALLER File Content (pip) Source: https://packaging.python.org/en/latest/specifications/recording-installed-packages This snippet shows a simple INSTALLER file containing the name of the installation tool, 'pip'. ```text pip ``` -------------------------------- ### Package installation output Source: https://packaging.python.org/en/latest/guides/installing-using-pip-and-virtual-environments Example output from pip showing the process of collecting and installing a package and its dependencies. ```text Collecting requests Using cached requests-2.18.4-py2.py3-none-any.whl Collecting chardet<3.1.0,>=3.0.2 (from requests) Using cached chardet-3.0.4-py2.py3-none-any.whl Collecting urllib3<1.23,>=1.21.1 (from requests) Using cached urllib3-1.22-py2.py3-none-any.whl Collecting certifi>=2017.4.17 (from requests) Using cached certifi-2017.7.27.1-py2.py3-none-any.whl Collecting idna<2.7,>=2.5 (from requests) Using cached idna-2.6-py2.py3-none-any.whl Installing collected packages: chardet, urllib3, certifi, idna, requests Successfully installed certifi-2017.7.27.1 chardet-3.0.4 idna-2.6 requests-2.18.4 urllib3-1.22 ``` -------------------------------- ### Example INSTALLER File Content (Custom Tool) Source: https://packaging.python.org/en/latest/specifications/recording-installed-packages This snippet shows an INSTALLER file with a custom tool name, 'MegaCorp Cloud Install-O-Matic'. ```text MegaCorp Cloud Install-O-Matic ``` -------------------------------- ### Installer Supported Tags Example Source: https://packaging.python.org/en/latest/specifications/platform-compatibility-tags An ordered list of supported compatibility tags for an installer running CPython 3.3 on a linux_x86_64 system, from most to least preferred. ```text cp33-cp33m-linux_x86_64 cp33-abi3-linux_x86_64 cp3-abi3-linux_x86_64 cp33-none-linux_x86_64* cp3-none-linux_x86_64* py33-none-linux_x86_64* py3-none-linux_x86_64* cp33-none-any cp3-none-any py33-none-any py3-none-any py32-none-any py31-none-any py30-none-any ``` -------------------------------- ### Install Compatible Package Version (Windows) Source: https://packaging.python.org/en/latest/tutorials/installing-packages Install a package version that is compatible with a specified version on Windows. This example installs any version '==1.4.*' that is also '>=1.4.2'. ```batch py -m pip install "SomeProject~=1.4.2" ``` -------------------------------- ### Build and Serve Python Packaging Guide Locally Source: https://packaging.python.org/en/latest/contribute Build the guide and serve it via an HTTP server. The guide will be accessible at http://localhost:8000. ```shell nox -s preview ``` -------------------------------- ### Replace python setup.py install Source: https://packaging.python.org/en/latest/discussions/setup-py-deprecated Use `pip install .` for installing a project from the current directory. This is the recommended method over `python setup.py install`. ```bash python -m pip install . ``` -------------------------------- ### Install Nox for Local Guide Building Source: https://packaging.python.org/en/latest/contribute Install or upgrade nox using pip. This is a prerequisite for building the guide locally. ```shell python -m pip install --user nox ``` -------------------------------- ### Editable Install with VCS and Local Dependencies Source: https://packaging.python.org/en/latest/guides/distributing-packages-using-setuptools Example of a requirements file specifying editable installs for the current project, a VCS repository, and a local directory. ```text -e . -e bar @ git+https://somerepo/bar.git ``` ```text -e /path/to/project/bar -e . ``` -------------------------------- ### Install Compatible Package Version (Unix/macOS) Source: https://packaging.python.org/en/latest/tutorials/installing-packages Install a package version that is compatible with a specified version on Unix-like systems. This example installs any version '==1.4.*' that is also '>=1.4.2'. ```bash python3 -m pip install "SomeProject~=1.4.2" ``` -------------------------------- ### Local Directory Editable Info Example Source: https://packaging.python.org/en/latest/specifications/direct-url-data-structure Example structure for the 'dir_info' key when the URL refers to a local directory. The 'editable' boolean indicates installation mode. ```json { "dir_info": { "editable": true } } ``` -------------------------------- ### Example Discovered Flask Plugins Source: https://packaging.python.org/en/latest/guides/creating-and-discovering-plugins Illustrates the expected output of the `discovered_plugins` dictionary when Flask-SQLAlchemy and Flask-Talisman are installed. ```python { 'flask_sqlalchemy': , 'flask_talisman': , } ``` -------------------------------- ### Example Pipenv Installation Output Source: https://packaging.python.org/en/latest/tutorials/managing-dependencies This output shows the process of Pipenv creating a virtual environment, installing packages, and updating the Pipfile. It is for informational purposes and may vary. ```text Creating a Pipfile for this project... Creating a virtualenv for this project... Using base prefix '/usr/local/Cellar/python3/3.6.2/Frameworks/Python.framework/Versions/3.6' New python executable in ~/.local/share/virtualenvs/tmp-agwWamBd/bin/python3.6 Also creating executable in ~/.local/share/virtualenvs/tmp-agwWamBd/bin/python Installing setuptools, pip, wheel...done. Virtualenv location: ~/.local/share/virtualenvs/tmp-agwWamBd Installing requests... Collecting requests Using cached requests-2.18.4-py2.py3-none-any.whl Collecting idna<2.7,>=2.5 (from requests) Using cached idna-2.6-py2.py3-none-any.whl Collecting urllib3<1.23,>=1.21.1 (from requests) Using cached urllib3-1.22-py2.py3-none-any.whl Collecting chardet<3.1.0,>=3.0.2 (from requests) Using cached chardet-3.0.4-py2.py3-none-any.whl Collecting certifi>=2017.4.17 (from requests) Using cached certifi-2017.7.27.1-py2.py3-none-any.whl Installing collected packages: idna, urllib3, chardet, certifi, requests Successfully installed certifi-2017.7.27.1 chardet-3.0.4 idna-2.6 requests-2.18.4 urllib3-1.22 Adding requests to Pipfile's [packages]... ``` -------------------------------- ### Pip version information (Unix/macOS) Source: https://packaging.python.org/en/latest/guides/installing-using-pip-and-virtual-environments Example output showing the pip version and its installation path within a virtual environment. ```text pip 23.3.1 from .../.venv/lib/python3.9/site-packages (python 3.9) ``` -------------------------------- ### Pip version information (Windows) Source: https://packaging.python.org/en/latest/guides/installing-using-pip-and-virtual-environments Example output showing the pip version and its installation path within a virtual environment on Windows. ```text pip 23.3.1 from .venv\lib\site-packages (Python 3.9.4) ``` -------------------------------- ### Install from Requirements File (Windows) Source: https://packaging.python.org/en/latest/tutorials/installing-packages Installs a list of packages and their dependencies as specified in a requirements.txt file on Windows. ```batch py -m pip install -r requirements.txt ``` -------------------------------- ### Install Normally from Local Source (Unix/macOS) Source: https://packaging.python.org/en/latest/tutorials/installing-packages Installs a project normally from a local source tree. ```bash python3 -m pip install ``` -------------------------------- ### Install from Requirements File (Unix/macOS) Source: https://packaging.python.org/en/latest/tutorials/installing-packages Installs a list of packages and their dependencies as specified in a requirements.txt file. ```bash python3 -m pip install -r requirements.txt ``` -------------------------------- ### Project Subdirectory Example Source: https://packaging.python.org/en/latest/specifications/direct-url-data-structure Example of the 'subdirectory' field, which specifies the location of 'pyproject.toml' or 'setup.py' relative to the repository root. ```json { "subdirectory": "src/my_package" } ``` -------------------------------- ### Install Python Packaging Tools on openSUSE Source: https://packaging.python.org/en/latest/guides/installing-using-linux-tools Installs pip, setuptools, and wheel for Python 3 on openSUSE systems. ```bash sudo zypper install python3-pip python3-setuptools python3-wheel ``` -------------------------------- ### Install Normally from Local Source (Windows) Source: https://packaging.python.org/en/latest/tutorials/installing-packages Installs a project normally from a local source tree on Windows. ```batch py -m pip install ``` -------------------------------- ### Install from Local Source Archive (Windows) Source: https://packaging.python.org/en/latest/tutorials/installing-packages Installs a package from a local source archive file (e.g., .tar.gz) on Windows. ```batch py -m pip install ./downloads/SomeProject-1.0.4.tar.gz ``` -------------------------------- ### Install from Local Source Archive (Unix/macOS) Source: https://packaging.python.org/en/latest/tutorials/installing-packages Installs a package from a local source archive file (e.g., .tar.gz). ```bash python3 -m pip install ./downloads/SomeProject-1.0.4.tar.gz ``` -------------------------------- ### Install Packages from a Requirements File Source: https://packaging.python.org/en/latest/guides/installing-using-pip-and-virtual-environments Install all packages listed in a requirements file. This is essential for setting up consistent development environments. ```text requests==2.18.4 google-auth==1.1.0 ``` ```bash python3 -m pip install -r requirements.txt ``` ```bash py -m pip install -r requirements.txt ``` -------------------------------- ### setup.py with Dynamic Version Source: https://packaging.python.org/en/latest/guides/modernize-setup-py-project An example setup.py file that dynamically determines the project version using an external library. ```python import setuptools import some_build_toolkit # comes from the `some-build-toolkit` library def get_version(): version = some_build_toolkit.compute_version() return version setuptools.setup( name="my-project", version=get_version(), ) ``` -------------------------------- ### Install a package (Unix/macOS) Source: https://packaging.python.org/en/latest/guides/installing-using-pip-and-virtual-environments Install a Python package, such as 'requests', from the Python Package Index (PyPI) into the active virtual environment. ```bash python3 -m pip install requests ``` -------------------------------- ### setup.py with Dynamic Metadata Declaration Source: https://packaging.python.org/en/latest/guides/modernize-setup-py-project An example setup.py file where the version is dynamically determined, requiring a 'dynamic' declaration in pyproject.toml. ```python import setuptools import some_build_toolkit def get_version(): version = some_build_toolkit.compute_version() return version setuptools.setup( name="my-project", version=get_version(), ) ``` -------------------------------- ### Start Python Interpreter on Windows Source: https://packaging.python.org/en/latest/tutorials/packaging-projects Starts the Python interpreter. Use this to test your installed package. ```bash py ``` -------------------------------- ### setup.py with Static Metadata Source: https://packaging.python.org/en/latest/guides/modernize-setup-py-project A minimal setup.py file used for defining static project metadata. ```python import setuptools setuptools.setup( name="my-project", version="1.2.3", ) ``` -------------------------------- ### Setup.py with README as long_description Source: https://packaging.python.org/en/latest/guides/making-a-pypi-friendly-readme Configures setup.py to read the README.md file and set it as the package's long description with 'text/markdown' content type. Uses pathlib for robust path handling. ```python from setuptools import setup # read the contents of your README file from pathlib import Path this_directory = Path(__file__).parent long_description = (this_directory / "README.md").read_text() setup( name='an_example_package', # other arguments omitted long_description=long_description, long_description_content_type='text/markdown' ) ``` -------------------------------- ### Start Python Interpreter on Unix/macOS Source: https://packaging.python.org/en/latest/tutorials/packaging-projects Starts the Python 3 interpreter. Use this to test your installed package. ```bash python3 ``` -------------------------------- ### Setup.py for Pkg_resources-Style Namespace Package Source: https://packaging.python.org/en/latest/guides/packaging-namespace-packages Example setup.py configuration for a pkg_resources-style namespace package, specifying the 'mynamespace' as a namespace package. ```python from setuptools import find_packages, setup setup( name='mynamespace-subpackage-a', ... packages=find_packages() namespace_packages=['mynamespace'] ) ``` -------------------------------- ### Setuptools Build System Configuration Source: https://packaging.python.org/en/latest/guides/writing-pyproject-toml Declares Setuptools as the build backend and lists its version requirements. ```toml [build-system] requires = ["setuptools >= 77.0.3"] build-backend = "setuptools.build_meta" ``` -------------------------------- ### Get Distribution Package Version Source: https://packaging.python.org/en/latest/discussions/versioning Use `importlib.metadata.version()` to get the version of an installed distribution package. This is a standard library function. ```python >>> importlib.metadata.version("cryptography") '41.0.7' ``` -------------------------------- ### Minimal setup.py for Legacy Processes Source: https://packaging.python.org/en/latest/guides/modernize-setup-py-project A minimalistic setup.py file that can be retained for processes that specifically require its presence, even if all logic is moved to pyproject.toml. ```python import setuptools setuptools.setup() ``` -------------------------------- ### Specifying Conditional Dependencies with Environment Markers Source: https://packaging.python.org/en/latest/specifications/dependency-specifiers Append a semicolon and a marker expression to a dependency to specify conditions under which it should be installed. This example installs 'pywin32' only on Windows. ```text pywin32; sys_platform == "win32" ``` -------------------------------- ### Example .dist-info and .data Directory Structure Source: https://packaging.python.org/en/latest/specifications/binary-distribution-format Illustrates the typical layout of .dist-info and .data directories for a Python distribution. ```text distribution-1.0.dist-info/ distribution-1.0.data/ ``` -------------------------------- ### Build Python Packaging Guide Locally Source: https://packaging.python.org/en/latest/contribute Run this shell command in the project's root folder to build the guide locally. The HTML output will be in the ./build/html directory. ```shell nox -s build ``` -------------------------------- ### setup.cfg License Configuration Source: https://packaging.python.org/en/latest/guides/licensing-examples-and-user-scenarios Defines project license and license files using setup.cfg. ```ini [metadata] license = MIT AND (Apache-2.0 OR BSD-2-Clause) license_files = LICENSE setuptools/_vendor/packaging/LICENSE setuptools/_vendor/packaging/LICENSE.APACHE setuptools/_vendor/packaging/LICENSE.BSD ``` -------------------------------- ### Basic pyproject.toml for Build System Source: https://packaging.python.org/en/latest/guides/modernize-setup-py-project This TOML snippet declares Setuptools as the build backend, which is the standard way to inform build frontends about the project's build system. ```toml [build-system] requires = ["setuptools"] build-backend = "setuptools.build_meta" ``` -------------------------------- ### Requires-Python Example Source: https://packaging.python.org/en/latest/specifications/core-metadata Specifies the Python version(s) that the distribution is compatible with. Installation tools use this to select appropriate versions. ```text Requires-Python: >=3.6 ``` -------------------------------- ### setup.py for Dynamic Version Calculation Source: https://packaging.python.org/en/latest/guides/modernize-setup-py-project This Python snippet shows the function to calculate the dynamic version, which is called by setup.py. ```python import setuptools import some_build_toolkit def get_version(): version = some_build_toolkit.compute_version() return version setuptools.setup( version=get_version(), ) ``` -------------------------------- ### Discover Flask Plugins by Naming Convention Source: https://packaging.python.org/en/latest/guides/creating-and-discovering-plugins Use `pkgutil.iter_modules()` to find installed modules starting with 'flask_'. This is useful when plugins follow a predictable naming pattern. ```python import importlib import pkgutil discovered_plugins = { name: importlib.import_module(name) for finder, name, ispkg in pkgutil.iter_modules() if name.startswith('flask_') } ``` -------------------------------- ### Example EXTERNALLY-MANAGED file content Source: https://packaging.python.org/en/latest/specifications/externally-managed-environments This INI-style file can be parsed by Python's configparser module to provide custom error messages to users attempting to install packages into an externally managed environment. ```ini [externally-managed] Error=To install Python packages system-wide, try apt install python3-xyz, where xyz is the package you are trying to install. If you wish to install a non-Debian-packaged Python package, create a virtual environment using python3 -m venv path/to/venv. Then use path/to/venv/bin/python and path/to/venv/bin/pip. Make sure you have python3-full installed. If you wish to install a non-Debian packaged Python application, it may be easiest to use pipx install xyz, which will manage a virtual environment for you. Make sure you have pipx installed. See /usr/share/doc/python3.9/README.venv for more information. ``` -------------------------------- ### License Specification in setup.cfg Source: https://packaging.python.org/en/latest/guides/licensing-examples-and-user-scenarios This snippet shows how to specify the license in the [metadata] table of a setup.cfg file. ```ini [metadata] license = MIT ``` -------------------------------- ### Create Virtual Environment on Windows Source: https://packaging.python.org/en/latest/tutorials/installing-packages Create a new virtual environment named 'tutorial_env' and activate it on Windows. This isolates project dependencies. ```batch py -m venv tutorial_env tutorial_env\Scripts\activate ``` -------------------------------- ### Install to User Site (Unix/macOS) Source: https://packaging.python.org/en/latest/tutorials/installing-packages Installs packages isolated to the current user, not affecting the system-wide Python installation. Ensure the user's binary directory is in your PATH if scripts are installed. ```bash python3 -m pip install --user SomeProject ``` -------------------------------- ### Example Project Detail URL Source: https://packaging.python.org/en/latest/specifications/simple-repository-api Illustrates the normalized URL format for accessing individual projects within a repository. ```text /holygrail/ ``` -------------------------------- ### Install Project in Editable Mode Source: https://packaging.python.org/en/latest/guides/distributing-packages-using-setuptools Install a Python package in editable mode for in-place editing without reinstallation. Dependencies are also installed. ```bash python3 -m pip install -e . ``` -------------------------------- ### Create Virtual Environment on Unix/macOS Source: https://packaging.python.org/en/latest/tutorials/installing-packages Create a new virtual environment named 'tutorial_env' and activate it on Unix-like systems. This isolates project dependencies. ```bash python3 -m venv tutorial_env source tutorial_env/bin/activate ``` -------------------------------- ### Install Prerelease Versions (Windows) Source: https://packaging.python.org/en/latest/tutorials/installing-packages Use this command to install pre-release and development versions of a package on Windows. By default, pip only installs stable versions. ```bash py -m pip install --pre SomeProject ``` -------------------------------- ### Install Package with Pip Source: https://packaging.python.org/en/latest/flow End users can install your published Python package into their environment using pip. This command fetches and installs the latest version. ```bash python3 -m pip install package-name ``` -------------------------------- ### Install Prerelease Versions (Unix/macOS) Source: https://packaging.python.org/en/latest/tutorials/installing-packages Use this command to install pre-release and development versions of a package on Unix-like systems. By default, pip only installs stable versions. ```bash python3 -m pip install --pre SomeProject ``` -------------------------------- ### Install to User Site (Windows) Source: https://packaging.python.org/en/latest/tutorials/installing-packages Installs packages isolated to the current user on Windows. Ensure the user's Scripts directory is in your PATH if scripts are installed. ```batch py -m pip install --user SomeProject ``` -------------------------------- ### Configure Universal Wheel (setup.cfg) Source: https://packaging.python.org/en/latest/guides/distributing-packages-using-setuptools Add this configuration to your setup.cfg to create a universal wheel if your project supports Python 2 and has no C extensions. ```ini [bdist_wheel] universal=1 ``` -------------------------------- ### Install Project in Editable Mode Without Dependencies Source: https://packaging.python.org/en/latest/guides/distributing-packages-using-setuptools Install a Python package in editable mode without installing its dependencies. Useful for specific development scenarios. ```bash python3 -m pip install -e . --no-deps ``` -------------------------------- ### Install Package from Local Archive File Source: https://packaging.python.org/en/latest/guides/installing-using-pip-and-virtual-environments Install a package from a local archive file (e.g., .tar.gz, .whl). This is useful for offline installations or when using pre-built distributions. ```bash python3 -m pip install requests-2.18.4.tar.gz ``` ```bash py -m pip install requests-2.18.4.tar.gz ``` -------------------------------- ### Version Matching Examples Source: https://packaging.python.org/en/latest/specifications/version-specifiers Demonstrates strict equality and prefix matching for version identifiers. ```text == 1.1 # Not equal, so 1.1.post1 does not match clause == 1.1.post1 # Equal, so 1.1.post1 matches clause == 1.1.* # Same prefix, so 1.1.post1 matches clause ``` -------------------------------- ### Project Detail Example Source: https://packaging.python.org/en/latest/specifications/simple-repository-api This JSON object demonstrates the structure of a project's details within the Simple Repository API, including metadata, file information, and versioning. It shows examples of optional keys like 'yanked' with a reason and 'provenance' URLs. ```json { "meta": { "api-version": "1.4", "project-status": "active", "project-status-reason": "this project is not yet haunted" }, "name": "holygrail", "files": [ { "filename": "holygrail-1.0.tar.gz", "url": "https://example.com/files/holygrail-1.0.tar.gz", "hashes": {"sha256": "...", "blake2b": "..."}, "requires-python": ">=3.7", "yanked": "Had a vulnerability", "size": 123456 }, { "filename": "holygrail-1.0-py3-none-any.whl", "url": "https://example.com/files/holygrail-1.0-py3-none-any.whl", "hashes": {"sha256": "...", "blake2b": "..."}, "requires-python": ">=3.7", "dist-info-metadata": true, "provenance": "https://example.com/files/holygrail-1.0-py3-none-any.whl.provenance", "size": 1337 } ], "versions": ["1.0"] } ``` -------------------------------- ### Install and run a package with pipx Source: https://packaging.python.org/en/latest/guides/installing-stand-alone-command-line-tools Installs a package using pipx and makes its applications globally available. After installation, you can run the package's applications directly from your terminal. ```bash $ pipx install PACKAGE $ PACKAGE_APPLICATION [ARGS] ``` ```bash $ pipx install cowsay installed package cowsay 6.1, installed using Python 3.12.2 These apps are now globally available - cowsay done! ✨ 🌟 ✨ $ cowsay -t moo ___ < moo > === \ \ ^__^ (oo)\ (__)\ || || ``` -------------------------------- ### Install External Data Files with `data_files` Source: https://packaging.python.org/en/latest/guides/distributing-packages-using-setuptools Install data files outside of Python packages. Useful for files used by other programs. Note: `data_files` is not supported when installing as egg. ```python data_files=[('my_data', ['data/data_file'])], ``` -------------------------------- ### Install Package with Extras (Windows) Source: https://packaging.python.org/en/latest/tutorials/installing-packages Install a package along with its optional 'extras' dependencies on Windows. Extras enable additional functionality. ```bash py -m pip install "SomePackage[PDF]" ``` ```bash py -m pip install "SomePackage[PDF]==3.0" ``` ```bash py -m pip install -e ".[PDF]" # editable project in current directory ``` -------------------------------- ### Install Package from Version Control System (Git) Source: https://packaging.python.org/en/latest/guides/installing-using-pip-and-virtual-environments Install a package directly from a version control system repository, such as a Git repository. This is useful for installing packages not yet published to PyPI. ```bash google-auth @ git+https://github.com/GoogleCloudPlatform/google-auth-library-python.git ``` -------------------------------- ### Example of Multiple Optional Dependencies Source: https://packaging.python.org/en/latest/specifications/core-metadata Shows how to specify multiple optional features for a single distribution using square brackets and commas in Requires-Dist. ```ini Requires-Dist: beaglevote[pdf] Requires-Dist: libexample[test, doc] ``` -------------------------------- ### Replace python setup.py --version Source: https://packaging.python.org/en/latest/discussions/setup-py-deprecated Use `python -m setuptools_scm` for version management, as a replacement for `python setup.py --version`. ```bash python -m setuptools_scm ``` -------------------------------- ### Install Python 3.4 with Wheel on CentOS/RHEL using IUS Source: https://packaging.python.org/en/latest/guides/installing-using-linux-tools Installs Python 3.4, along with its wheel package, on CentOS 7/RHEL 7 using the IUS repository for parallel installation. ```bash sudo yum install python34u python34u-wheel ``` -------------------------------- ### License Expression Examples Source: https://packaging.python.org/en/latest/guides/licensing-examples-and-user-scenarios Provides various examples of valid License-Expression values. ```text License-Expression: MIT ``` ```text License-Expression: BSD-3-Clause ``` ```text License-Expression: MIT AND (Apache-2.0 OR BSD-2-Clause) ``` ```text License-Expression: MIT OR GPL-2.0-or-later OR (FSFUL AND BSD-2-Clause) ``` ```text License-Expression: GPL-3.0-only WITH Classpath-Exception-2.0 OR BSD-3-Clause ``` ```text License-Expression: LicenseRef-Public-Domain OR CC0-1.0 OR Unlicense ``` ```text License-Expression: LicenseRef-Proprietary ``` ```text License-Expression: LicenseRef-Custom-License ``` -------------------------------- ### Provides-Dist Examples Source: https://packaging.python.org/en/latest/specifications/core-metadata Lists Distutils projects contained within this distribution. Can specify versions and environment markers. ```text Provides-Dist: OtherProject ``` ```text Provides-Dist: AnotherProject==3.4 ``` ```text Provides-Dist: virtual_package; python_version >= "3.4" ``` -------------------------------- ### Deprecated setup.py Commands Source: https://packaging.python.org/en/latest/discussions/setup-py-deprecated These commands using `python setup.py` directly are deprecated and should not be used anymore. Prefer using build frontends like `pip` or `build` instead. ```bash python setup.py install ``` ```bash python setup.py develop ``` ```bash python setup.py sdist ``` ```bash python setup.py bdist_wheel ``` -------------------------------- ### Build and Install Wheels with Pip Cache Source: https://packaging.python.org/en/latest/guides/index-mirrors-and-caches Use this command to pre-build installation files (wheels) for your project's requirements and then install them using the local wheelhouse. This avoids repeated downloads from PyPI. ```bash python3 -m pip wheel --wheel-dir=/tmp/wheelhouse SomeProject python3 -m pip install --no-index --find-links=/tmp/wheelhouse SomeProject ```