relopdk.blogg.se

Setuptools setup
Setuptools setup







  • Python packages and Python modules to include in the distribution (dist) – the find_packages(‘,’) default argument will incorporate all packages that include an _init_.py file and are located in the local directory (dir) where setup.py is installed.
  • Project name – enter a name for your project in quotes.
  • The script syntax spells out the information you need to provide, including metadata such as: The following script is an example of how to create a setup.py script for your Python 3 (not Python 2) project. If you’re working with more than one project, rather than installing everything in /site-packages, you’ll want to work with virtual environments to ensure each project has just the dependencies it requires. If you get a permissions error, instead of using sudo, consider creating a virtual environment with virtualenv, venv, pipenv or pyenv. $ python -m pip install –upgrade pip setuptools Instead, your first step should be to use pip to update your Python installation to the latest version of setuptools on popular operating systems like Windows, Linux or macOS: Setuptools is typically installed with Python downloaded from, so there’s no need to separately install setuptools. This article provides a brief tutorial on how to work with setuptools.

    setuptools setup

    But for projects that consist of multiple files, need additional libraries, or need a specific version of Python, setuptools will be required. A Python file that relies only on the standard library can be redistributed and reused without the need to use setuptools. Setuptools is the Python Packaging Authority (PyPA) package development process library and utility for building Python projects based on packages and their dependencies listed in a setup.py script. Simply put, setup.py is a build script template distributed with Python’s setuptools package. If you’re packaging a Python package for publication, how do you ensure that all of the required dependencies are included? Just like pip is the standard package manager for Python, setup.py is the heart and center of Python projects installed with pip.









    Setuptools setup