-
Notifications
You must be signed in to change notification settings - Fork 11
/
setup.py
75 lines (65 loc) · 1.9 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
# SPDX-License-Identifier: GPL-3.0-or-later
# SPDX-FileCopyrightText: Copyright contributors to the OpenScanHub project.
import os
from pathlib import Path
from setuptools import PEP420PackageFinder, setup
from setuptools_scm import get_version
find_namespace_packages = PEP420PackageFinder.find
THIS_FILE_PATH = os.path.dirname(os.path.abspath(__file__))
package_version = "1.0.0"
data_files = {
"/etc/osh": [
"osh/client/client.conf",
"osh/worker/worker.conf",
],
"/usr/lib/systemd/system": [
"osh/hub/osh-retention.service",
"osh/hub/osh-retention.timer",
"osh/hub/osh-stats.service",
"osh/hub/osh-stats.timer",
"osh/worker/osh-worker.service",
],
"/usr/share/bash-completion/completions": [
"osh/client/completion/osh-cli.bash",
],
"/usr/share/zsh/site-functions": [
"osh/client/completion/_osh-cli"
],
"/usr/bin": [
"osh/client/osh-cli",
],
"/usr/sbin": [
"osh/hub/scripts/osh-retention",
"osh/hub/scripts/osh-stats",
"osh/worker/osh-worker",
],
}
package_data = {
"osh": [
"hub/osh-hub.wsgi",
"hub/scripts/checker_groups.txt",
]
}
hub_path = Path("osh/hub")
for folder in (
"templates",
"static-assets",
"scan/fixtures",
"waiving/fixtures",
):
for path in (hub_path / folder).rglob("*"):
if path.is_file():
package_data["osh"].append(str(path.relative_to("osh")))
if os.path.isdir(".git"):
package_version = get_version()
setup(
name="osh",
version=package_version,
url="https://github.com/openscanhub/openscanhub",
author="Red Hat, Inc.",
author_email="openscanhub@lists.fedoraproject.org",
description="OpenScanHub is a service for static and dynamic analysis.",
packages=find_namespace_packages(exclude=["kobo*"]),
package_data=package_data,
data_files=data_files.items(),
)