from setuptools import find_packages
+def scm_version():
+ def local_scheme(version):
+ if version.tag and not version.distance:
+ return version.format_with("")
+ else:
+ return version.format_choice("+{node}", "+{node}.dirty")
+ return {
+ "relative_to": __file__,
+ "version_scheme": "guess-next-dev",
+ "local_scheme": local_scheme
+ }
+
setup(
# Vitals
name="gram",
author="LambdaConcept",
author_email="contact@lambdaconcept.com",
description="DRAM core for LambdaSoC",
- use_scm_version= {
- "root": '..',
- "relative_to": __file__,
- "version_scheme": "guess-next-dev",
- "local_scheme": lambda version : version.format_choice("+{node}", "+{node}.dirty"),
- "fallback_version": "r0.0"
- },
-
+ use_scm_version=scm_version(),
# Imports / exports / requirements
platforms='any',
packages=find_packages(exclude=("test*", "doc*", "examples*", "contrib*", "libgram*")),