remove unqlite requirement

-conditionally import PTCWallet (needed for testing, requires unqlite)

-install unqlite on travis and appveyor
This commit is contained in:
Jack 2016-12-17 20:03:35 -05:00
parent 09846413bd
commit 5a76a03cb6
6 changed files with 5 additions and 6 deletions

View file

@ -1,6 +1,5 @@
import logging import logging
import miniupnpc import miniupnpc
from lbrynet.core.PTCWallet import PTCWallet
from lbrynet.core.BlobManager import DiskBlobManager, TempBlobManager from lbrynet.core.BlobManager import DiskBlobManager, TempBlobManager
from lbrynet.dht import node from lbrynet.dht import node
from lbrynet.core.PeerManager import PeerManager from lbrynet.core.PeerManager import PeerManager
@ -147,6 +146,7 @@ class Session(object):
self.lbryid = generate_id() self.lbryid = generate_id()
if self.wallet is None: if self.wallet is None:
from lbrynet.core.PTCWallet import PTCWallet
self.wallet = PTCWallet(self.db_dir) self.wallet = PTCWallet(self.db_dir)
if self.peer_manager is None: if self.peer_manager is None:

View file

@ -43,7 +43,6 @@ from lbrynet.core import system_info
from lbrynet.core.StreamDescriptor import StreamDescriptorIdentifier, download_sd_blob from lbrynet.core.StreamDescriptor import StreamDescriptorIdentifier, download_sd_blob
from lbrynet.core.StreamDescriptor import BlobStreamDescriptorReader from lbrynet.core.StreamDescriptor import BlobStreamDescriptorReader
from lbrynet.core.Session import Session from lbrynet.core.Session import Session
from lbrynet.core.PTCWallet import PTCWallet
from lbrynet.core.Wallet import LBRYumWallet from lbrynet.core.Wallet import LBRYumWallet
from lbrynet.core.looping_call_manager import LoopingCallManager from lbrynet.core.looping_call_manager import LoopingCallManager
from lbrynet.core.server.BlobRequestHandler import BlobRequestHandlerFactory from lbrynet.core.server.BlobRequestHandler import BlobRequestHandlerFactory
@ -719,6 +718,7 @@ class Daemon(AuthJSONRPCServer):
return defer.succeed(LBRYumWallet(self.db_dir, config)) return defer.succeed(LBRYumWallet(self.db_dir, config))
elif self.wallet_type == PTC_WALLET: elif self.wallet_type == PTC_WALLET:
log.info("Using PTC wallet") log.info("Using PTC wallet")
from lbrynet.core.PTCWallet import PTCWallet
return defer.succeed(PTCWallet(self.db_dir)) return defer.succeed(PTCWallet(self.db_dir))
else: else:
raise ValueError('Wallet Type {} is not valid'.format(self.wallet_type)) raise ValueError('Wallet Type {} is not valid'.format(self.wallet_type))

View file

@ -15,7 +15,7 @@ OPTIONS = {
'LSUIElement': True, 'LSUIElement': True,
}, },
'packages': [ 'packages': [
'lbrynet', 'lbryum', 'requests', 'unqlite', 'certifi', 'lbrynet', 'lbryum', 'requests', 'certifi',
'pkg_resources', 'json', 'jsonrpc', 'seccure', 'pkg_resources', 'json', 'jsonrpc', 'seccure',
], ],
} }

View file

@ -37,6 +37,8 @@ python get-pip.py
rm get-pip.py rm get-pip.py
pip install -r requirements.txt pip install -r requirements.txt
pip install cython
pip install unqlite
pip install mock pylint coveralls pip install mock pylint coveralls
# have to do `which trial` instead of simply trial because coverage needs the full path # have to do `which trial` instead of simply trial because coverage needs the full path

View file

@ -24,7 +24,6 @@ simplejson==3.8.2
six==1.9.0 six==1.9.0
slowaes==0.1a1 slowaes==0.1a1
txJSON-RPC==0.3.1 txJSON-RPC==0.3.1
unqlite==0.2.0
wsgiref==0.1.2 wsgiref==0.1.2
zope.interface==4.1.3 zope.interface==4.1.3
base58==0.2.2 base58==0.2.2

View file

@ -57,7 +57,6 @@ requires = [
'six==1.9.0', 'six==1.9.0',
'slowaes==0.1a1', 'slowaes==0.1a1',
'txJSON-RPC==0.3.1', 'txJSON-RPC==0.3.1',
'unqlite==0.2.0',
'wsgiref==0.1.2', 'wsgiref==0.1.2',
'zope.interface==4.1.3', 'zope.interface==4.1.3',
'base58==0.2.2', 'base58==0.2.2',
@ -287,7 +286,6 @@ elif platform == WINDOWS:
'six', 'six',
'aes', 'aes',
'txjsonrpc', 'txjsonrpc',
'unqlite',
'wsgiref', 'wsgiref',
'zope.interface', 'zope.interface',
'os', 'os',