Skip to content

Commit 7ab282f

Browse files
authored
Merge pull request #152 from ffyuanda/master
fix: optimized install_requires parsing process
2 parents 72272a2 + 34d3a4f commit 7ab282f

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

setup.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,19 @@
11
import setuptools
2+
from os import path
23

34
desc_file = "README.md"
45

6+
here = path.abspath(path.dirname(__file__))
7+
58
with open(desc_file, "r") as fh:
69
long_description = fh.read()
710

11+
# get the dependencies and installs
12+
with open(path.join(here, "requirements.txt"), encoding="utf-8") as f:
13+
all_reqs = f.read().split("\n")
14+
15+
install_requires = [x.strip() for x in all_reqs if "git+" not in x]
16+
817
setuptools.setup(
918
name="casbin",
1019
author="TechLee",
@@ -15,7 +24,7 @@
1524
url="https://github.com/casbin/pycasbin",
1625
keywords=["casbin", "acl", "rbac", "abac", "auth", "authz", "authorization", "access control", "permission"],
1726
packages=setuptools.find_packages(exclude=("tests",)),
18-
install_requires=['simpleeval>=0.9.10'],
27+
install_requires=install_requires,
1928
python_requires=">=3.3",
2029
license="Apache 2.0",
2130
classifiers=[

0 commit comments

Comments
 (0)