-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
30 lines (26 loc) · 1.1 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
"""Setup module for this Python package."""
import os
import re
from setuptools import find_packages, setup
# Fill `install_requires` with packages in environment.run.yml.
install_requires = []
with open(os.path.join(os.path.dirname(__file__), "environment.run.yml")) as spec:
for line in spec:
match = re.search(r"^\s*-\s+(?P<n>.+)(?P<v>(?:~=|==|!=|<=|>=|<|>|===|@)[^\s\n\r]+)", line)
if match and match.group("n") not in ("pip", "python"):
# Support git+ssh://git@.../[email protected] packages, see stackoverflow.com/a/54794506.
prefix = (
match.group("n").split("/")[-1].replace(".git", "") + " @ "
if match.group("n").startswith("git+")
else ""
)
install_requires.append(prefix + match.group("n") + match.group("v"))
setup(
name="accessibility_check_backend",
version="0.2.0",
description="Extra checks for FOD BOSA's Accessibility Check tool.",
package_dir={"": "src"},
packages=find_packages(where="src"),
install_requires=install_requires,
include_package_data=True,
)