distribute

install_requires based on python version

install_requires based on python version Question: I have a module that works both on python 2 and python 3. In Python<3.2 I would like to install a specific package as a dependency. For Python>=3.2. Something like: install_requires=[ “threadpool >= 1.2.7 if python_version < 3.2.0”, ], How can one make that? Asked By: iTayb || Source …

Total answers: 2

Easy_install and pip broke: pkg_resources.DistributionNotFound: distribute==0.6.36

Easy_install and pip broke: pkg_resources.DistributionNotFound: distribute==0.6.36 Question: I was tried to upgrade pip with pip install –upgrade pip on OSX and pip and easy_install both dont work. When running pip Traceback (most recent call last): File “/usr/local/bin/pip”, line 5, in <module> from pkg_resources import load_entry_point File “/usr/local/Cellar/python/2.7.4/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/distribute-0.6.49-py2.7.egg/pkg_resources.py”, line 2881, in <module> parse_requirements(__requires__), Environment() File “/usr/local/Cellar/python/2.7.4/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/distribute-0.6.49-py2.7.egg/pkg_resources.py”, …

Total answers: 8

What does "error: option –single-version-externally-managed not recognized" indicate?

What does "error: option –single-version-externally-managed not recognized" indicate? Question: I seem to have suddenly started to encounter the error error: option –single-version-externally-managed not recognized when using pip install with various packages (including PyObjC and astropy). I’ve never seen this error before, but it’s now also showing up on travis-ci builds for which nothing has changed. …

Total answers: 7

How do I force `setup.py test` to install dependencies into my `virtualenv`?

How do I force `setup.py test` to install dependencies into my `virtualenv`? Question: In a crusade to make my application pip-installable, I’m fighting big fights with setuptools and distribute. I assume my dependencies are correct, i.e. installing with pip install myapp should probably fill the virtual environment correctly. However, I’d like to streamline development while …

Total answers: 2

How do setuptools, distribute, and pip relate to one another?

How do setuptools, distribute, and pip relate to one another? Question: I’ve been teaching myself Python through the book “Learn Python The Hard Way” (2nd Edition). In exercise 46 it told me to read up on Pip, Distribute, and a few other packages. The documentation for pip was clear enough. It allows me to install/uninstall, …

Total answers: 1

When to use pip requirements file versus install_requires in setup.py?

When to use pip requirements file versus install_requires in setup.py? Question: I’m using pip with virtualenv to package and install some Python libraries. I’d imagine what I’m doing is a pretty common scenario. I’m the maintainer on several libraries for which I can specify the dependencies explicitly. A few of my libraries are dependent on …

Total answers: 4

Differences between distribute, distutils, setuptools and distutils2?

Differences between distribute, distutils, setuptools and distutils2? Question: The Situation I’m trying to port an open-source library to Python 3. (SymPy, if anyone is wondering.) So, I need to run 2to3 automatically when building for Python 3. To do that, I need to use distribute. Therefore, I need to port the current system, which (according …

Total answers: 5

Pip: Specifying minor version

Pip: Specifying minor version Question: In my requirements.txt file I want to specify that my app needs Django version 1.3.x. That is, either 1.3.0, or 1.3.1, or 1.3.2, etc. (When these come out.) But not 1.4, when it comes out. What’s the syntax for this? Asked By: Ram Rachum || Source Answers: According to Ian …

Total answers: 2

How do I use data in package_data from source code?

How do I use data in package_data from source code? Question: In setup.py, I have specified package_data like this: packages=[‘hermes’], package_dir={‘hermes’: ‘hermes’}, package_data={‘hermes’: [‘templates/*.tpl’]}, And my directory structure is roughly hermes/ | | docs/ | … | hermes/ | | __init__.py | code.py | templates | | python.tpl | | README | setup.py The problem …

Total answers: 1

Does pip handle extras_requires from setuptools/distribute based sources?

Does pip handle extras_requires from setuptools/distribute based sources? Question: I have package “A” with a setup.py and an extras_requires line like: extras_require = { ‘ssh’: [‘paramiko’], }, And a package “B” that depends on util: install_requires = [‘A[ssh]’] If I run python setup.py install on package B, which uses setuptools.command.easy_install under the hood, the extras_requires …

Total answers: 3