Skip to content
Snippets Groups Projects
Commit ec124d6dc9dc authored by Laurent Peuch's avatar Laurent Peuch
Browse files

refactor(pkginfo): uniformize depends syntaxe with other projects

parent f43e4d6cd495
No related branches found
No related tags found
1 merge request!76refactor(pkginfo): uniformize depends syntaxe with other projects
Pipeline #124053 passed
......@@ -100,11 +100,11 @@
)
]
install_requires = [
"logilab-common >= 1.6.0",
"logilab-database >= 1.6.0",
"yapps2-logilab >= 2.2.1",
"logilab-constraint >= 0.5.0", # fallback if the gecode compiled module is missing
'typing-extensions; python_version < "3.8"',
"setuptools",
]
__depends__ = {
"logilab-common": ">= 1.6.0",
"logilab-database": ">= 1.6.0",
"yapps2-logilab": ">= 2.2.1",
"logilab-constraint": ">= 0.5.0", # fallback if the gecode compiled module is missing
'typing-extensions; python_version < "3.8"': None,
"setuptools": None,
}
......@@ -37,6 +37,13 @@
with open(osp.join(here, "README.rst"), encoding="utf-8") as f:
long_description = f.read()
requires = {}
for entry in ("__depends__",): # "__recommends__"):
requires.update(pkginfo.get(entry, {}))
install_requires = [
"{0} {1}".format(d, v and v or "").strip() for d, v in requires.items()
]
if os.environ.get("RQL_FORCE_GECODE"):
MyBuildExt = build_ext.build_ext
else:
......@@ -78,7 +85,7 @@
classifiers=pkginfo.get("classifiers", []),
packages=find_packages(exclude=["contrib", "docs", "test*"]),
python_requires=">=3.7",
install_requires=pkginfo.get("install_requires"),
install_requires=install_requires,
ext_modules=pkginfo.get("ext_modules"),
cmdclass={"build_ext": MyBuildExt},
)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment