1
1
Fork 0
mirror of https://github.com/pypa/pip synced 2023-12-13 21:30:23 +01:00

Conditionally install the pip._vendor items

This commit is contained in:
Donald Stufft 2014-11-19 23:56:27 -05:00
parent 3b918b1461
commit 79fbaf66a1

View file

@ -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'],