|
1 |
| -import os |
2 | 1 | import sys
|
3 | 2 |
|
4 |
| -from setuptools import find_packages, setup |
5 |
| - |
6 |
| - |
7 |
| -def read(rel_path: str) -> str: |
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 open(os.path.join(here, rel_path)) as fp: |
12 |
| - return fp.read() |
13 |
| - |
14 |
| - |
15 |
| -def get_version(rel_path: str) -> str: |
16 |
| - for line in read(rel_path).splitlines(): |
17 |
| - if line.startswith("__version__"): |
18 |
| - # __version__ = "0.9" |
19 |
| - delim = '"' if '"' in line else "'" |
20 |
| - return line.split(delim)[1] |
21 |
| - raise RuntimeError("Unable to find version string.") |
22 |
| - |
23 |
| - |
24 |
| -long_description = read("README.rst") |
| 3 | +from setuptools import setup |
25 | 4 |
|
26 | 5 | setup(
|
27 |
| - name="pip", |
28 |
| - version=get_version("src/pip/__init__.py"), |
29 |
| - description="The PyPA recommended tool for installing Python packages.", |
30 |
| - long_description=long_description, |
31 |
| - license="MIT", |
32 |
| - classifiers=[ |
33 |
| - "Development Status :: 5 - Production/Stable", |
34 |
| - "Intended Audience :: Developers", |
35 |
| - "License :: OSI Approved :: MIT License", |
36 |
| - "Topic :: Software Development :: Build Tools", |
37 |
| - "Programming Language :: Python", |
38 |
| - "Programming Language :: Python :: 3", |
39 |
| - "Programming Language :: Python :: 3 :: Only", |
40 |
| - "Programming Language :: Python :: 3.7", |
41 |
| - "Programming Language :: Python :: 3.8", |
42 |
| - "Programming Language :: Python :: 3.9", |
43 |
| - "Programming Language :: Python :: 3.10", |
44 |
| - "Programming Language :: Python :: 3.11", |
45 |
| - "Programming Language :: Python :: 3.12", |
46 |
| - "Programming Language :: Python :: Implementation :: CPython", |
47 |
| - "Programming Language :: Python :: Implementation :: PyPy", |
48 |
| - ], |
49 |
| - url="https://pip.pypa.io/", |
50 |
| - project_urls={ |
51 |
| - "Documentation": "https://pip.pypa.io", |
52 |
| - "Source": "https://github.com/pypa/pip", |
53 |
| - "Changelog": "https://pip.pypa.io/en/stable/news/", |
54 |
| - }, |
55 |
| - author="The pip developers", |
56 |
| - |
57 |
| - package_dir={"": "src"}, |
58 |
| - packages=find_packages( |
59 |
| - where="src", |
60 |
| - exclude=["contrib", "docs", "tests*", "tasks"], |
61 |
| - ), |
62 |
| - package_data={ |
63 |
| - "pip": ["py.typed"], |
64 |
| - "pip._vendor": ["vendor.txt"], |
65 |
| - "pip._vendor.certifi": ["*.pem"], |
66 |
| - "pip._vendor.requests": ["*.pem"], |
67 |
| - "pip._vendor.distlib._backport": ["sysconfig.cfg"], |
68 |
| - "pip._vendor.distlib": [ |
69 |
| - "t32.exe", |
70 |
| - "t64.exe", |
71 |
| - "t64-arm.exe", |
72 |
| - "w32.exe", |
73 |
| - "w64.exe", |
74 |
| - "w64-arm.exe", |
75 |
| - ], |
76 |
| - }, |
77 | 6 | entry_points={
|
78 | 7 | "console_scripts": [
|
79 | 8 | "pip=pip._internal.cli.main:main",
|
80 | 9 | f"pip{sys.version_info[0]}=pip._internal.cli.main:main",
|
81 | 10 | "pip{}.{}=pip._internal.cli.main:main".format(*sys.version_info[:2]),
|
82 | 11 | ],
|
83 | 12 | },
|
84 |
| - zip_safe=False, |
85 |
| - # NOTE: python_requires is duplicated in __pip-runner__.py. |
86 |
| - # When changing this value, please change the other copy as well. |
87 |
| - python_requires=">=3.7", |
88 | 13 | )
|
0 commit comments