-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
43 lines (34 loc) · 921 Bytes
/
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
from pathlib import Path
from typing import Any
from setuptools import find_namespace_packages, setup
from retspy_radar.package_info import pkg_info
this_directory: Path = Path(__file__).parent
long_description: str = pkg_info.long_description
pkg_info.long_description = (this_directory / long_description).read_text()
EXCLUDE: list[str] = [
item
for sublist in [
(f"{excluding}.*", excluding)
for excluding in (
"__pycache__",
"build",
"dist",
"docs",
"examples",
"scripts",
"tests",
"tutorial",
)
]
for item in sublist
]
args: dict[str, Any] = {
k: v
for k, v in pkg_info.__dict__.items()
if not (k.startswith("__") and k.endswith("__"))
}
setup(
packages=find_namespace_packages(exclude=EXCLUDE),
**args,
)
pkg_info.long_description = long_description