Skip to content

Commit

Permalink
fix setup.py error
Browse files Browse the repository at this point in the history
Signed-off-by: JoeyHwong <joeyhwong@gknow.cn>
  • Loading branch information
JoeyHwong-gk committed Aug 31, 2021
1 parent 8b782ae commit 5702b63
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 6 deletions.
2 changes: 1 addition & 1 deletion lib/MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
include OWNERS requirements.txt sedna/VERSION README.md
include OWNERS requirements.txt sedna/VERSION sedna/README.md
recursive-include examples *.txt *.py
23 changes: 18 additions & 5 deletions lib/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@

assert sys.version_info >= (3, 6), "Sorry, Python < 3.6 is not supported."

with open("README.md", "r") as fh:
with open(os.path.join(os.path.dirname(__file__), "sedna", "README.md"),
"r", encoding="utf-8") as fh:
long_desc = fh.read()

with open(os.path.join(os.path.dirname(__file__), 'sedna', 'VERSION'),
Expand All @@ -30,6 +31,18 @@
install_requires = [line.strip() for line in
fh.readlines() if line.strip()]

with open("OWNERS", "r", encoding="utf-8") as fh:
check, approvers = False, set()
for line in fh:
if not line.strip():
continue
if check:
approvers.add(line.strip().split()[-1])
check = (line.startswith("approvers:") or
(line.startswith(" -") and check))

maintainer = ",".join(approvers) or "sedna"

setup(
name='sedna',
version=__version__,
Expand All @@ -38,10 +51,10 @@
on Sedna project",
packages=find_packages(exclude=["tests", "*.tests",
"*.tests.*", "tests.*"]),
author="",
author_email="",
maintainer="",
maintainer_email="",
author=maintainer,
author_email="pujie2@huawei.com",
maintainer=maintainer,
maintainer_email="liulinghui@huawei.com",
include_package_data=True,
python_requires=">=3.6",
long_description=long_desc,
Expand Down

0 comments on commit 5702b63

Please sign in to comment.