-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
91 lines (81 loc) · 2.96 KB
/
setup.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
# Copyright (c) 2021 Philip May, Deutsche Telekom AG
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""Build script for setuptools."""
import os
from typing import List
import setuptools
project_name = "lazy_imports"
source_code = "https://github.com/bachorp/lazy-imports"
keywords = "import imports lazy"
install_requires: List[str] = []
extras_require = {
"checking": [
"black",
"flake8",
"isort",
"mdformat",
"pydocstyle",
"mypy",
"pylint",
"pylintfileheader",
],
"testing": ["pytest", "packaging"],
}
extras_require["all"] = list({package_name for value in extras_require.values() for package_name in value})
def get_version():
"""Read version from ``__init__.py``."""
version_filepath = os.path.join(os.path.dirname(__file__), project_name, "__init__.py")
with open(version_filepath) as f:
for line in f:
if line.startswith("__version__"):
return line.strip().split()[-1][1:-1]
assert False
with open("README.md", "r", encoding="utf-8") as fh:
long_description = fh.read()
setuptools.setup(
name=project_name,
version=get_version(),
maintainer="Pascal Bachor",
author="Pascal Bachor",
author_email="[email protected]",
description="Tool to support lazy imports",
long_description=long_description,
long_description_content_type="text/markdown",
project_urls={
"Changelog": source_code + "/blob/HEAD/CHANGELOG.md",
"Bug Tracker": source_code + "/issues",
"Source Code": source_code,
},
packages=setuptools.find_packages(),
python_requires=">=3.9",
install_requires=install_requires,
extras_require=extras_require,
keywords=keywords,
classifiers=[
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"License :: OSI Approved :: Apache Software License",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3 :: Only",
"Topic :: Software Development",
"Topic :: Software Development :: Libraries",
"Topic :: Software Development :: Libraries :: Python Modules",
"Operating System :: OS Independent",
],
)