pyln: Derive version from git for pyln-testing

This commit is contained in:
Christian Decker 2021-09-23 14:41:41 +02:00
parent 808f582638
commit 5efa7659f9
2 changed files with 14 additions and 3 deletions

View File

@ -1 +1,5 @@
__version__ = "0.10.1"
from .__version__ import __version__
__all__ = [
"__version__",
]

View File

@ -1,5 +1,4 @@
from setuptools import setup
from pyln.testing import __version__
with open('README.md', encoding='utf-8') as f:
@ -9,7 +8,6 @@ with open('requirements.txt', 'r') as f:
requirements = [l.strip() for l in f]
setup(name='pyln-testing',
version=__version__,
description='Library to facilitate writing tests for for lightningd',
long_description=long_description,
long_description_content_type='text/markdown',
@ -19,4 +17,13 @@ setup(name='pyln-testing',
install_requires=requirements,
license='MIT',
packages=['pyln.testing'],
use_scm_version={
"root": "../..",
"relative_to": __file__,
"write_to": "contrib/pyln-testing/pyln/testing/__version__.py",
"write_to_template": "__version__ = \"{version}\"\n",
"version_scheme": "post-release",
"local_scheme": "no-local-version",
},
setup_requires=["setuptools_scm"],
zip_safe=True)