updated setup.py and lbry/__init__.py now includes imports to solve cyclic import issues

This commit is contained in:
Lex Berezhny 2020-05-18 08:20:13 -04:00
parent 4f879bbbae
commit 8ac78990d8
2 changed files with 33 additions and 15 deletions

View file

@ -1,2 +1,10 @@
__version__ = "0.68.0" __version__ = "0.68.0"
version = tuple(map(int, __version__.split('.'))) # pylint: disable=invalid-name from lbry.wallet import Account, Wallet, WalletManager
from lbry.blockchain import (
Ledger, RegTestLedger, TestNetLedger,
Transaction, Output, Input,
dewies_to_lbc, lbc_to_dewies, dict_values_to_lbc
)
from lbry.service import API, Daemon, FullNode, LightClient
from lbry.db.database import Database
from lbry.conf import Config

View file

@ -1,19 +1,30 @@
import os import os
from lbry import __name__, __version__ import codecs
from setuptools import setup, find_packages from setuptools import setup, find_packages
BASE = os.path.dirname(__file__)
with open(os.path.join(BASE, 'README.md'), encoding='utf-8') as fh: def read(relative_path):
long_description = fh.read() here = os.path.abspath(os.path.dirname(__file__))
with codecs.open(os.path.join(here, relative_path), 'r') as fp:
return fp.read()
def get_version(relative_path):
for line in read(relative_path).splitlines():
if line.startswith('__version__'):
return line.split('"')[1]
else:
raise RuntimeError("Unable to find version string.")
setup( setup(
name=__name__, name='lbry',
version=__version__, version=get_version('lbry/__init__.py'),
author="LBRY Inc.", author="LBRY Inc.",
author_email="hello@lbry.com", author_email="hello@lbry.com",
url="https://lbry.com", url="https://lbry.com",
description="A decentralized media library and marketplace", description="A decentralized media library and marketplace",
long_description=long_description, long_description=read('README.md'),
long_description_content_type="text/markdown", long_description_content_type="text/markdown",
keywords="lbry protocol media", keywords="lbry protocol media",
license='MIT', license='MIT',
@ -22,9 +33,7 @@ setup(
zip_safe=False, zip_safe=False,
entry_points={ entry_points={
'console_scripts': [ 'console_scripts': [
'lbrynet=lbry.extras.cli:main', 'lbrynet=lbry.cli:main',
'torba-server=lbry.wallet.server.cli:main',
'orchstr8=lbry.wallet.orchstr8.cli:main',
], ],
}, },
install_requires=[ install_requires=[
@ -46,14 +55,15 @@ setup(
'hachoir', 'hachoir',
'multidict==4.6.1', 'multidict==4.6.1',
'coincurve==11.0.0', 'coincurve==11.0.0',
'pbkdf2==1.3',
'attrs==18.2.0', 'attrs==18.2.0',
'pylru==1.1.0',
'pyzmq==18.1.1', 'pyzmq==18.1.1',
'plyvel==1.0.5',
'sqlalchemy@git+https://github.com/sqlalchemy/sqlalchemy.git', 'sqlalchemy@git+https://github.com/sqlalchemy/sqlalchemy.git',
'psycopg2', 'chiabip158@git+https://github.com/Chia-Network/chiabip158.git',
], ],
extras_require={
'ui': ['pyside2'],
'postgresql': ['psycopg2']
},
classifiers=[ classifiers=[
'Framework :: AsyncIO', 'Framework :: AsyncIO',
'Intended Audience :: Developers', 'Intended Audience :: Developers',