-
Notifications
You must be signed in to change notification settings - Fork 97
Expand file tree
/
Copy pathsetup.py
More file actions
51 lines (44 loc) · 1.34 KB
/
Copy pathsetup.py
File metadata and controls
51 lines (44 loc) · 1.34 KB
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
from pathlib import Path
from setuptools import find_packages, setup
ROOT = Path(__file__).parent
def read_project_version() -> str:
in_project = False
for line in (ROOT / "pyproject.toml").read_text(encoding="utf-8").splitlines():
stripped = line.strip()
if stripped == "[project]":
in_project = True
continue
if in_project and stripped.startswith("["):
break
if in_project and stripped.startswith("version"):
return stripped.split("=", 1)[1].strip().strip('"')
raise RuntimeError("Unable to read project.version from pyproject.toml")
setup(
name="openhack",
version=read_project_version(),
description=(
"File-based, scenario-first workspace for source-guided whitebox "
"security review."
),
long_description=(ROOT / "README.md").read_text(encoding="utf-8"),
long_description_content_type="text/markdown",
packages=find_packages(where="src"),
package_dir={"": "src"},
python_requires=">=3.9",
install_requires=[
"jsonschema>=4.18",
"PyYAML>=6.0",
],
extras_require={
"dev": [
"ruff>=0.6",
"mypy>=1.10",
"types-jsonschema",
],
},
entry_points={
"console_scripts": [
"openhack=openhack.cli:main",
],
},
)