The Python package installer https://pip.pypa.io/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

90 lines
3.0 KiB

  1. # The following comment should be removed at some point in the future.
  2. # mypy: disallow-untyped-defs=False
  3. import codecs
  4. import os
  5. import sys
  6. from setuptools import find_packages, setup
  7. def read(rel_path):
  8. here = os.path.abspath(os.path.dirname(__file__))
  9. # intentionally *not* adding an encoding option to open, See:
  10. # https://github.com/pypa/virtualenv/issues/201#issuecomment-3145690
  11. with codecs.open(os.path.join(here, rel_path), 'r') as fp:
  12. return fp.read()
  13. def get_version(rel_path):
  14. for line in read(rel_path).splitlines():
  15. if line.startswith('__version__'):
  16. # __version__ = "0.9"
  17. delim = '"' if '"' in line else "'"
  18. return line.split(delim)[1]
  19. raise RuntimeError("Unable to find version string.")
  20. long_description = read('README.rst')
  21. setup(
  22. name="pip",
  23. version=get_version("src/pip/__init__.py"),
  24. description="The PyPA recommended tool for installing Python packages.",
  25. long_description=long_description,
  26. license='MIT',
  27. classifiers=[
  28. "Development Status :: 5 - Production/Stable",
  29. "Intended Audience :: Developers",
  30. "License :: OSI Approved :: MIT License",
  31. "Topic :: Software Development :: Build Tools",
  32. "Programming Language :: Python",
  33. "Programming Language :: Python :: 2",
  34. "Programming Language :: Python :: 2.7",
  35. "Programming Language :: Python :: 3",
  36. "Programming Language :: Python :: 3.5",
  37. "Programming Language :: Python :: 3.6",
  38. "Programming Language :: Python :: 3.7",
  39. "Programming Language :: Python :: 3.8",
  40. "Programming Language :: Python :: 3.9",
  41. "Programming Language :: Python :: Implementation :: CPython",
  42. "Programming Language :: Python :: Implementation :: PyPy",
  43. ],
  44. url='https://pip.pypa.io/',
  45. keywords='distutils easy_install egg setuptools wheel virtualenv',
  46. project_urls={
  47. "Documentation": "https://pip.pypa.io",
  48. "Source": "https://github.com/pypa/pip",
  49. "Changelog": "https://pip.pypa.io/en/stable/news/",
  50. },
  51. author='The pip developers',
  52. author_email='distutils-sig@python.org',
  53. package_dir={"": "src"},
  54. packages=find_packages(
  55. where="src",
  56. exclude=["contrib", "docs", "tests*", "tasks"],
  57. ),
  58. package_data={
  59. "pip._vendor": ["vendor.txt"],
  60. "pip._vendor.certifi": ["*.pem"],
  61. "pip._vendor.requests": ["*.pem"],
  62. "pip._vendor.distlib._backport": ["sysconfig.cfg"],
  63. "pip._vendor.distlib": ["t32.exe", "t64.exe", "w32.exe", "w64.exe"],
  64. },
  65. entry_points={
  66. "console_scripts": [
  67. "pip=pip._internal.cli.main:main",
  68. "pip{}=pip._internal.cli.main:main".format(sys.version_info[0]),
  69. "pip{}.{}=pip._internal.cli.main:main".format(
  70. *sys.version_info[:2]
  71. ),
  72. ],
  73. },
  74. zip_safe=False,
  75. python_requires='>=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*',
  76. )