Skip to content

Commit fc637cc

Browse files
committed
refactor: removes repeated dependencies from setup.py and use from pyproject.toml.
1 parent 31f9676 commit fc637cc

File tree

1 file changed

+5
-18
lines changed

1 file changed

+5
-18
lines changed

setup.py

Lines changed: 5 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
1+
import tomllib
12
import sys
23

4+
with open("pyproject.toml", "rb") as f:
5+
pyproject_content = tomllib.load(f)
6+
37
BUILD_REQUIREMENTS: tuple[str, ...] = (
48
"argparse-manpage==4.6",
59
"Babel==2.17.0",
@@ -17,23 +21,6 @@
1721
"pytest-mock~=3.15.1",
1822
"pytest-cov~=7.0.0",
1923
)
20-
INSTALL_REQUIREMENTS: tuple[str, ...] = (
21-
"argcomplete~=3.5.3",
22-
"numpy~=1.26.4",
23-
"pandas~=2.2.3",
24-
"ccsyspath~=1.1.0",
25-
"clang~=18.1.8",
26-
"llvmlite~=0.45.1",
27-
"libclang~=18.1.1",
28-
"python-decouple~=3.8",
29-
"requests~=2.32.3",
30-
"typing-extensions~=4.12.2",
31-
"aiohttp~=3.9.3",
32-
"Jinja2~=3.1.5",
33-
"cachetools==5.5.2",
34-
"gidgethub~=5.3.0",
35-
"pymongo~=4.12.1",
36-
)
3724

3825

3926
if "--build-requirements" in sys.argv:
@@ -46,7 +33,7 @@
4633
print(" ".join(TEST_REQUIREMENTS))
4734
sys.exit(0)
4835
if "--install-requirements" in sys.argv:
49-
print(" ".join(INSTALL_REQUIREMENTS))
36+
print(" ".join(pyproject_content["project"]["dependencies"]))
5037
sys.exit(0)
5138
try:
5239
from Cython.Build import cythonize

0 commit comments

Comments
 (0)