Questions tagged [setuptools]

setuptools is a set of enhancements to Python's distutils which simplify building, distribution and installation of Python packages.

setuptools is a (largely) drop-in replacement for distutils first published in 2004. Its most notable addition over the unmodified distutils tools was the ability to declare dependencies on other packages. It is currently recommended as a more regularly updated alternative to distutils that offers consistent support for more recent packaging standards across a wide range of Python versions.

The recommended pip installer runs all setup.py scripts with setuptools, even if the script itself only imports distutils.
This text is Copyright © 2001-2021 Python Software Foundation; All Rights Reserved.


Tag usage

  • Questions about setuptools-specific features should be tagged .
  • If a question is only about functionality common to both distutils and setuptools, the tag can be used in advance.
  • If it's unclear that the question author is using setuptools, the tag should be used instead.

Other related tags:

Modern alternatives to setuptools

Resources

3420 questions
2
votes
2 answers

setup_requires only for some commands

I have a distutils-style Python package which requires a specific, and quite large, dependency for its build step. Currently, this dependency is specified under the setup_requires argument to distutils.setup. Unfortunately, this means the dependency…
skoy
  • 266
  • 2
  • 10
2
votes
1 answer

How to I change the Manifest.in depending on the extra_requires I wish to use?

My problem is that a project I'm working with comes shipped with all of the training data needed to reproduce its results. I want the default installation (pip install package) to include all this stuff, but a specific installation (pip install…
Sam Bobel
  • 1,784
  • 1
  • 15
  • 26
2
votes
1 answer

In Set up project context, what does the options "Localized Resourses from " & "Content files from " mean?

I am creating a set up project for a windows C# application. I understood the meaning of the option "primary output from {project name}". But I didnt understand what is the purpose of the options "Localized Resourses from {project name}" and …
codeLover
  • 3,720
  • 10
  • 65
  • 121
2
votes
2 answers

How to setup a developer environment for a python project similar to NodeJs

Background Story I have a python project which uses setuptools for building the source distribution. Pylint is integrated for running tests. And I come from a heavy NodeJs background. Problem After doing changes to the code, I have several steps…
Pubudu Dodangoda
  • 2,742
  • 2
  • 22
  • 38
2
votes
1 answer

How to use the "File Check" option of BMG(BOOTSTRAPPER MANIFEST GENERATOR) tool to check if the preRequisite is already installed on the system?

Hi I am using BMG (Bootstrpper Manifest Generator) tool to package a custom "PREREQUISITE" application, which can be installed prior to installation of a set up project application. But I want to check if the prerequisite application…
codeLover
  • 3,720
  • 10
  • 65
  • 121
2
votes
0 answers

Cython inheritance from git submodule, override scikitlearn methods

I am working with scikitlearn and would like to override the build method of the treebuilder class for regression trees implemented using cython. In order to do so I figured I would need access to the cython code, so I have added scikitlearn as a…
holmrenser
  • 425
  • 3
  • 11
2
votes
1 answer

Undownloadable dependencies

I'm working on a package that has a proprietary dependency with no public download location. If pip finds that this specific dependency isn't installed, I want to either abort the install, or print a warning and continue with the dependency…
user2357112
  • 260,549
  • 28
  • 431
  • 505
2
votes
1 answer

Building from and uploading to a local Python repository without writing credentials to disk

I have a Python build pipeline set up, with a Jfrog Artifactory Python repository serving our internal packages. The pipeline uses this repository to resolve internal dependencies and upload build artefacts. This is currently done with python…
Alex Forbes
  • 3,039
  • 2
  • 19
  • 22
2
votes
1 answer

Can coexist in the same Python project pipenv and setuptools?

I'm confused about these two libraries. In the same project does it make sense having both pipenv and setuptools? I'm writing a cli in click and using setuptools simplify the life. Also managing dependencies with pipenv simply the life.
Mazzy
  • 13,354
  • 43
  • 126
  • 207
2
votes
1 answer

Issue with tox where requirements.txt references an index

I'm running into an issue with running tox which depends on requirements.txt which specifies a index which is required to install a local package which is hosted on our local devpi instance. Specifically I get the following (abbreviated) error, >…
John
  • 783
  • 6
  • 12
2
votes
1 answer

Mixing Python and C++ source files in pybind11

I am using PyBind11 to make a Python project. My directory structure looks a like this: ./ my_pkg/ __init__.py func1.py func2.py My C++ code looks like this: int myfunc(){ return 1; } PYBIND11_PLUGIN(cppmodule) { py::module…
Richard
  • 56,349
  • 34
  • 180
  • 251
2
votes
2 answers

Extract messages programmatically with PyBabel

Right now, I’m extracting messages using pybabel extract -F babel.cfg -o messages.pot . This walks through all my Python files and extracts messages correctly. However, I call this through subprocess.call(), which is pretty ugly, given PyBbel is…
GergelyPolonkai
  • 6,230
  • 6
  • 35
  • 69
2
votes
2 answers

zc.buildout randomly broke during routine patch today

Deploying a security patch to a production machine today and zc.buildout just randomly breaks. I already tried to upgrade pip and this still doesn't resolve the issue. $ ./bin/buildout mr.developer: Queued 'django-appregister' for…
Andre
  • 1,292
  • 1
  • 17
  • 34
2
votes
2 answers

Distutils partially ignoring CC environment variable when building python extension

I am trying to install the subprocess32 python module (https://github.com/google/python-subprocess32) and am having some issues with distutils. The module includes a C extension that has to be built, but when I run either pip install . or python…
R_Beagrie
  • 583
  • 5
  • 10
2
votes
1 answer

Exclude a folder from a python package for uploading a package to PyPI

Right now a have my packages variable in setup.py defined like this: packages=find_packages(include=['zeption']) But zeption has a folder examples I want to exclude: zeption/ ├── ... ├── setup.py ├── ... └── zeption ├── ... ├── examples…
pythad
  • 4,241
  • 2
  • 19
  • 41