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
1 answer

Python: Permission issue when installing an egg

Tried installing South sitewide with easy_install. However I'm having permission issues: drwxr-x--- 2 root root 4096 Nov 8 10:23 South-0.7.2-py2.6.egg-info I then tried installing it with pip but received the same results. I am assuming I…
Belmin Fernandez
  • 8,307
  • 9
  • 51
  • 75
2
votes
0 answers

Python pip install error 1

pip install works in general for various packages but when I tried to install a certain package it gave my a pycryptodome error. I noticed pycryptodome was not installed so I did pip install pycryptodome and I got Command "c:\python27\python.exe -c…
ChumbiChubaGo
  • 968
  • 2
  • 9
  • 15
2
votes
2 answers

Is there any reason to list standard library dependencies when using setuptools?

I've gone down the Python packaging and distribution rabbit-hole and am wondering: Is there ever any reason to provide standard library modules/packages as dependencies to setup() when using setuptools? And a side note: the only setuptools docs I…
conner.xyz
  • 6,273
  • 8
  • 39
  • 65
2
votes
1 answer

package data not installed from python .egg file

I'm trying to include some data files in a python package using the setuptools package_data option. I'm then accessing the files with pkg_resources. This works perfectly when the python .egg file is installed as-is (i.e. still zipped). But when the…
Roban
  • 31
  • 5
2
votes
1 answer

pypiserver - Package description doesn't appear in pip search

I am struggling to find information about how / where to fill a summary for a PyPI package that can be seen next to the package name when typing pip search . We run a private PyPI server with the pypiserver library and would like all our…
JahMyst
  • 1,616
  • 3
  • 20
  • 39
2
votes
0 answers

Command-line application using setuptools and Anaconda Python

I have a Python command line application that I have been distributing on PyPI in the manner described here: https://gehrcke.de/2014/02/distributing-a-python-command-line-application/ In short, that means I'm using setuptools with the entry_points…
J Jones
  • 3,060
  • 4
  • 26
  • 43
2
votes
1 answer

How setuptools builds extensions, where to add a compiler option?

I was trying to build numpy on Cygwin, but I got a error with xlocale.h which is defined in X11/xlocale.h. My naive patch was to add this: #ifdef __CYGWIN__ #include "X11/Xlocale.h" #else #include "xlocale.h" #endif Alternatively I could…
nowox
  • 25,978
  • 39
  • 143
  • 293
2
votes
3 answers

Pylons app deployment with privately developed dependencies

In my organization, we have a couple of internally developed Python packages. For sake of example, let's call them Foo and Bar. Both are developed in separate Git repositories. Foo is a Pylons application that uses certain library functions from…
Nikolaj
  • 1,121
  • 1
  • 7
  • 10
2
votes
2 answers

Packages in same namespace: can't import module in setup script

I'm curious about the following situation. Let's say I have two projects named project_alpha and project_bravo, both defining a top-level namespace package mymeta. The layout: project_alpha/ -> mymeta/ -> __init__.py ->…
hoefling
  • 59,418
  • 12
  • 147
  • 194
2
votes
1 answer

Conda setuptools install changes shebangs to default python install

I'm having an issue where packages installed via setuptools to python anaconda have shebangs rewritten to the wrong location. I have installed python anaconda and setuptools package. I have verified that python executable points to the anaconda…
GrantD71
  • 1,787
  • 3
  • 19
  • 27
2
votes
0 answers

Automatically import modules from a namespace package

Is there a way to automatically import modules from an implicit namespace package (PEP420), if we are not allowed to have __init__.py files? I decided to split my package mylib into two namespace packages: mylib-core and mylib-extra. Before, when I…
ostrokach
  • 17,993
  • 11
  • 78
  • 90
2
votes
1 answer

setup.py console_scripts entry point does not resolve import

I have following setup.py: from setuptools import setup from distutils.core import setup setup( name="foobar", version="0.1.0", author="Batman", author_email="batman@gmail.com", packages = ["foobar"], …
user3292534
2
votes
1 answer

How to use `pip` and setup.py to automatically install dependencies that may be private repositories hosted on github

I don't think this is a dupicate, because I tried all links I could find for the past 2 hours and none of the solutions worked. I want the user to be able to clone a repository, cd into the directory, and run $ pip install . (or at least pip install…
confused00
  • 2,556
  • 21
  • 39
2
votes
1 answer

How to get setuptools to use a relative path in easy-install.pth when doing "setup.py develop"

I'm installing a python egg using setuptools with the "python setup.py develop" command. It's important that all install paths be relative. I see that I can do: python setup.py develop --egg-path ../../../../my_directory and the .egg-link file…
Jason
  • 21
  • 2
2
votes
1 answer

Setuptools : how to use the setup() function within a script (no setup specific command line argument)

I'm writing a tool to automatically generate .egg files from python projects. The tool basically discovers some properties to guess the setup options (such as version number etc). Now I would like to call the setup() function, with the context…
Olivier H
  • 835
  • 2
  • 8
  • 26