2012-09-01 19:33:52 +02:00
|
|
|
import codecs
|
2011-04-04 19:23:50 +02:00
|
|
|
import os
|
2012-09-01 19:33:52 +02:00
|
|
|
import re
|
|
|
|
import sys
|
2013-08-18 11:59:44 +02:00
|
|
|
|
2013-03-09 20:17:28 +01:00
|
|
|
from setuptools import setup, find_packages
|
2008-10-16 00:02:57 +02:00
|
|
|
|
2014-11-20 05:56:27 +01:00
|
|
|
|
2013-01-18 22:25:15 +01:00
|
|
|
here = os.path.abspath(os.path.dirname(__file__))
|
2011-04-04 19:19:35 +02:00
|
|
|
|
2013-07-23 19:53:54 +02:00
|
|
|
|
2012-09-01 19:33:52 +02:00
|
|
|
def read(*parts):
|
2014-01-28 15:17:51 +01:00
|
|
|
# intentionally *not* adding an encoding option to open, See:
|
|
|
|
# https://github.com/pypa/virtualenv/issues/201#issuecomment-3145690
|
2018-05-31 08:14:15 +02:00
|
|
|
with codecs.open(os.path.join(here, *parts), "r") as fp:
|
2017-10-18 07:03:07 +02:00
|
|
|
return fp.read()
|
2012-09-01 19:33:52 +02:00
|
|
|
|
2013-07-23 19:53:54 +02:00
|
|
|
|
2012-09-01 19:33:52 +02:00
|
|
|
def find_version(*file_paths):
|
|
|
|
version_file = read(*file_paths)
|
2018-05-30 12:59:52 +02:00
|
|
|
version_match = re.search(
|
2018-05-31 08:14:15 +02:00
|
|
|
r"^__version__ = ['\"]([^'\"]*)['\"]", version_file, re.M
|
2018-05-30 12:59:52 +02:00
|
|
|
)
|
2012-09-01 19:33:52 +02:00
|
|
|
if version_match:
|
|
|
|
return version_match.group(1)
|
2018-05-30 12:59:52 +02:00
|
|
|
|
2012-09-01 19:33:52 +02:00
|
|
|
raise RuntimeError("Unable to find version string.")
|
|
|
|
|
2017-03-18 19:42:11 +01:00
|
|
|
|
2018-05-31 08:14:15 +02:00
|
|
|
long_description = read("README.rst")
|
2008-10-16 00:02:57 +02:00
|
|
|
|
2014-01-28 15:17:51 +01:00
|
|
|
setup(
|
|
|
|
name="pip",
|
2017-08-31 17:48:18 +02:00
|
|
|
version=find_version("src", "pip", "__init__.py"),
|
2014-03-11 17:08:52 +01:00
|
|
|
description="The PyPA recommended tool for installing Python packages.",
|
2014-01-28 15:17:51 +01:00
|
|
|
long_description=long_description,
|
2018-05-31 08:14:15 +02:00
|
|
|
license="MIT",
|
2014-01-28 15:17:51 +01:00
|
|
|
classifiers=[
|
|
|
|
"Development Status :: 5 - Production/Stable",
|
|
|
|
"Intended Audience :: Developers",
|
|
|
|
"License :: OSI Approved :: MIT License",
|
|
|
|
"Topic :: Software Development :: Build Tools",
|
2017-10-22 20:25:05 +02:00
|
|
|
"Programming Language :: Python",
|
2014-01-28 15:17:51 +01:00
|
|
|
"Programming Language :: Python :: 2",
|
|
|
|
"Programming Language :: Python :: 2.7",
|
|
|
|
"Programming Language :: Python :: 3",
|
2014-03-01 19:38:46 +01:00
|
|
|
"Programming Language :: Python :: 3.4",
|
2015-10-01 15:13:16 +02:00
|
|
|
"Programming Language :: Python :: 3.5",
|
2017-01-18 18:41:30 +01:00
|
|
|
"Programming Language :: Python :: 3.6",
|
2017-10-22 20:25:05 +02:00
|
|
|
"Programming Language :: Python :: Implementation :: CPython",
|
2018-05-30 12:59:52 +02:00
|
|
|
"Programming Language :: Python :: Implementation :: PyPy",
|
2014-01-28 15:17:51 +01:00
|
|
|
],
|
2018-05-31 08:14:15 +02:00
|
|
|
url="https://pip.pypa.io/",
|
|
|
|
keywords="distutils easy_install egg setuptools wheel virtualenv",
|
|
|
|
author="The pip developers",
|
|
|
|
author_email="pypa-dev@groups.google.com",
|
2017-08-31 17:48:18 +02:00
|
|
|
package_dir={"": "src"},
|
|
|
|
packages=find_packages(
|
2018-05-31 08:14:15 +02:00
|
|
|
where="src", exclude=["contrib", "docs", "tests*", "tasks"]
|
2017-08-31 17:48:18 +02:00
|
|
|
),
|
2015-06-24 02:37:21 +02:00
|
|
|
package_data={
|
|
|
|
"pip._vendor.certifi": ["*.pem"],
|
|
|
|
"pip._vendor.requests": ["*.pem"],
|
|
|
|
"pip._vendor.distlib._backport": ["sysconfig.cfg"],
|
|
|
|
"pip._vendor.distlib": ["t32.exe", "t64.exe", "w32.exe", "w64.exe"],
|
|
|
|
},
|
2014-01-28 15:17:51 +01:00
|
|
|
entry_points={
|
|
|
|
"console_scripts": [
|
2017-08-31 17:48:18 +02:00
|
|
|
"pip=pip._internal:main",
|
2018-05-30 12:59:52 +02:00
|
|
|
"pip%s=pip._internal:main" % sys.version_info[:1],
|
|
|
|
"pip%s.%s=pip._internal:main" % sys.version_info[:2],
|
2018-05-31 08:14:15 +02:00
|
|
|
]
|
2014-01-28 15:17:51 +01:00
|
|
|
},
|
|
|
|
zip_safe=False,
|
2018-05-31 08:14:15 +02:00
|
|
|
python_requires=">=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*",
|
2013-08-18 11:59:44 +02:00
|
|
|
)
|