diff options
author | Donald Stufft <donald@stufft.io> | 2014-11-19 23:56:27 -0500 |
---|---|---|
committer | Donald Stufft <donald@stufft.io> | 2014-11-20 07:53:57 -0500 |
commit | 79fbaf66a15f3c988174d67df3dbbf5bacabb109 (patch) | |
tree | 3180f8b42f4eba52f765caa0cf9a38e4e08294f0 /setup.py | |
parent | 3b918b1461a5697695002f495daed4dde9fdff43 (diff) | |
download | pip-79fbaf66a15f3c988174d67df3dbbf5bacabb109.tar.gz |
Conditionally install the pip._vendor items
Diffstat (limited to 'setup.py')
-rw-r--r-- | setup.py | 20 |
1 files changed, 19 insertions, 1 deletions
@@ -6,6 +6,13 @@ import sys from setuptools import setup, find_packages from setuptools.command.test import test as TestCommand + +# We support this primarily for downstream distributions. This is NOT intended +# to be used by end users and any actual use of thus is not considered a +# supported configuration. +NO_VENDOR = ("PIP_NO_VENDOR_FOR_DOWNSTREAM" in os.environ) + + here = os.path.abspath(os.path.dirname(__file__)) @@ -42,6 +49,16 @@ long_description = read('README.rst') tests_require = ['pytest', 'virtualenv>=1.10', 'scripttest>=1.3', 'mock'] +find_excludes = ["contrib", "docs", "tests*", "tasks"] + +py_modules = [] + + +if NO_VENDOR: + find_excludes += ["pip._vendor", "pip._vendor.*"] + py_modules += ["pip._vendor.__init__"] + + setup( name="pip", version=find_version("pip", "__init__.py"), @@ -66,7 +83,8 @@ setup( author_email='python-virtualenv@groups.google.com', url='https://pip.pypa.io/', license='MIT', - packages=find_packages(exclude=["contrib", "docs", "tests*", "tasks"]), + py_modules=py_modules, + packages=find_packages(exclude=find_excludes), package_data={ 'pip._vendor.certifi': ['*.pem'], 'pip._vendor.requests': ['*.pem'], |