core-lightning/contrib/pyln-client/setup.py
Rusty Russell 07d2639f51 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>
2021-09-08 09:34:14 +09:30

30 lines
965 B
Python

from setuptools import setup
import io
with io.open('README.md', encoding='utf-8') as f:
long_description = f.read()
with io.open('requirements.txt', encoding='utf-8') as f:
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',
version=version,
description='Client library for lightningd',
long_description=long_description,
long_description_content_type='text/markdown',
url='http://github.com/ElementsProject/lightning',
author='Christian Decker',
author_email='decker.christian@gmail.com',
license='MIT',
packages=['pyln.client'],
scripts=[],
zip_safe=True,
install_requires=requirements)