Debian Codegraph @

setup.py

raw symbols SCIP
1 #!/usr/bin/env python
2 import re
3
4 # While I generally consider it an antipattern to try and support both
5 # setuptools and distutils with a single setup.py, in this specific instance
6 # where certifi is a dependency of setuptools, it can create a circular
7 # dependency when projects attempt to unbundle stuff from setuptools and pip.
8 # Though we don't really support that, it makes things easier if we do this and
9 # should hopefully cause less issues for end users.
10 try:
11 from setuptools import setup
12 except ImportError:
13 from distutils.core import setup
14
15
16 version_regex = r'__version__ = ["\']([^"\']*)["\']'
17 with open("certifi/__init__.py") as f:
18 text = f.read()
19 match = re.search(version_regex, text)
20
21 if match:
22 VERSION = match.group(1)
23 else:
24 raise RuntimeError("No version number found!")
25
26 setup(
27 name="certifi",
28 version=VERSION,
29 description="Python package for providing Mozilla's CA Bundle.",
30 long_description=open("README.rst").read(),
31 author="Kenneth Reitz",
32 author_email="[email protected]",
33 url="https://github.com/certifi/python-certifi",
34 packages=[
35 "certifi",
36 ],
37 package_dir={"certifi": "certifi"},
38 package_data={"certifi": ["*.pem", "py.typed"]},
39 include_package_data=True,
40 zip_safe=False,
41 license="MPL-2.0",
42 python_requires=">=3.7",
43 classifiers=[
44 "Development Status :: 5 - Production/Stable",
45 "Intended Audience :: Developers",
46 "License :: OSI Approved :: Mozilla Public License 2.0 (MPL 2.0)",
47 "Natural Language :: English",
48 "Programming Language :: Python",
49 "Programming Language :: Python :: 3",
50 "Programming Language :: Python :: 3 :: Only",
51 "Programming Language :: Python :: 3.7",
52 "Programming Language :: Python :: 3.8",
53 "Programming Language :: Python :: 3.9",
54 "Programming Language :: Python :: 3.10",
55 "Programming Language :: Python :: 3.11",
56 "Programming Language :: Python :: 3.12",
57 "Programming Language :: Python :: 3.13",
58 "Programming Language :: Python :: 3.14",
59 ],
60 project_urls={
61 "Source": "https://github.com/certifi/python-certifi",
62 },
63 )