Skip to content

Commit

Permalink
Add decisionengine as decisionengine_modules requirement
Browse files Browse the repository at this point in the history
  • Loading branch information
vitodb committed Dec 7, 2023
1 parent 02ab367 commit 8fd05bb
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,13 +71,28 @@
]
rpm_require.extend(__base_pip_requires)



# This metadata can be read out with:
# import importlib.metadata
# dir(importlib.metadata.metadata('decisionengine_modules'))
# or
# importlib_resources on python < 3.9
#
# Much of it comes out of decisionengine_modules.about.py

# for decisionengine dev we have version in the form X.Y.Z.devN
# while for tag we have version in the form X.Y.Z
verarr=about.__version__.split(".")[:4]
if len(verarr)>3:
# this is a dev version
ver='.'.join(verarr[:3]+[verarr[3][:3]])
else:
# this is a tag
ver='.'.join(verarr[:3])
# string to add decisionengine as decisionengine_modules requirement
de_req=[f"decisionengine>="+ver]

setup(
setup_requires=["setuptools >= 51.2", "wheel >= 0.36.2", "setuptools_scm >= 6.3.1"],
python_requires=">3.7.0",
Expand All @@ -89,7 +104,7 @@
license=about.__license__,
package_dir={"": "src"},
packages=find_packages(where="src", exclude=("tests", "*.tests", "*.tests.*", "build.*", "doc.*")),
install_requires=runtime_require,
install_requires=runtime_require+de_req,
extras_require={
"develop": devel_req,
},
Expand Down

0 comments on commit 8fd05bb

Please sign in to comment.