mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-21 16:14:23 +01:00
pyln.client: don't try to use module inside setup.py.
This fails once it has dependencies (next patch): instead extract version manually. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
@@ -1,5 +1,4 @@
|
|||||||
from setuptools import setup
|
from setuptools import setup
|
||||||
from pyln import client
|
|
||||||
import io
|
import io
|
||||||
|
|
||||||
|
|
||||||
@@ -9,8 +8,14 @@ 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=client.__version__,
|
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',
|
||||||
|
|||||||
Reference in New Issue
Block a user