mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-20 07:34:24 +01:00
pyln: Derive version from git for pyln-client
This commit is contained in:
2
.github/scripts/build.sh
vendored
2
.github/scripts/build.sh
vendored
@@ -22,7 +22,7 @@ export FUZZING=${FUZZING:-0}
|
|||||||
|
|
||||||
env
|
env
|
||||||
|
|
||||||
pip3 install --user -U -r requirements.txt
|
pip3 install --user -U -r requirements.txt --use-feature=in-tree-build
|
||||||
|
|
||||||
# Install utilities that aren't dependencies, but make
|
# Install utilities that aren't dependencies, but make
|
||||||
# running tests easier/feasible on CI (and pytest which
|
# running tests easier/feasible on CI (and pytest which
|
||||||
|
|||||||
1
contrib/pyln-client/.gitignore
vendored
Normal file
1
contrib/pyln-client/.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
pyln/client/__version__.py
|
||||||
@@ -1,8 +1,7 @@
|
|||||||
from .lightning import LightningRpc, RpcError, Millisatoshi
|
from .lightning import LightningRpc, RpcError, Millisatoshi
|
||||||
from .plugin import Plugin, monkey_patch, RpcException
|
from .plugin import Plugin, monkey_patch, RpcException
|
||||||
from .gossmap import Gossmap, GossmapNode, GossmapChannel, GossmapNodeId
|
from .gossmap import Gossmap, GossmapNode, GossmapChannel, GossmapNodeId
|
||||||
|
from .__version__ import __version__
|
||||||
__version__ = "0.10.1"
|
|
||||||
|
|
||||||
|
|
||||||
__all__ = [
|
__all__ = [
|
||||||
|
|||||||
@@ -8,14 +8,8 @@ with io.open('README.md', encoding='utf-8') as f:
|
|||||||
with io.open('requirements.txt', encoding='utf-8') as f:
|
with io.open('requirements.txt', encoding='utf-8') as f:
|
||||||
requirements = [r for r in f.read().split('\n') if len(r)]
|
requirements = [r for r in f.read().split('\n') if len(r)]
|
||||||
|
|
||||||
# setup shouldn't try to load module, so we hack-parse __init__.py
|
|
||||||
with io.open('pyln/client/__init__.py', encoding='utf-8') as f:
|
|
||||||
for line in f.read().split('\n'):
|
|
||||||
if line.startswith('__version__ = "'):
|
|
||||||
version = line.split('"')[1]
|
|
||||||
|
|
||||||
setup(name='pyln-client',
|
setup(name='pyln-client',
|
||||||
version=version,
|
|
||||||
description='Client library for lightningd',
|
description='Client library for lightningd',
|
||||||
long_description=long_description,
|
long_description=long_description,
|
||||||
long_description_content_type='text/markdown',
|
long_description_content_type='text/markdown',
|
||||||
@@ -26,4 +20,13 @@ setup(name='pyln-client',
|
|||||||
packages=['pyln.client'],
|
packages=['pyln.client'],
|
||||||
scripts=[],
|
scripts=[],
|
||||||
zip_safe=True,
|
zip_safe=True,
|
||||||
|
use_scm_version={
|
||||||
|
"root": "../..",
|
||||||
|
"relative_to": __file__,
|
||||||
|
"write_to": "contrib/pyln-client/pyln/client/__version__.py",
|
||||||
|
"write_to_template": "__version__ = \"{version}\"\n",
|
||||||
|
"version_scheme": "post-release",
|
||||||
|
"local_scheme": "no-local-version",
|
||||||
|
},
|
||||||
|
setup_requires=["setuptools_scm"],
|
||||||
install_requires=requirements)
|
install_requires=requirements)
|
||||||
|
|||||||
Reference in New Issue
Block a user