Add dependencies to setup, fix file path issues
This commit is contained in:
parent
29c2249a53
commit
d93e2f5691
2
setup.py
2
setup.py
|
@ -13,5 +13,7 @@ setup(
|
|||
author_email="arcalinea@z.cash",
|
||||
license="MIT",
|
||||
url="http://github.com/zcash/xcat",
|
||||
install_requires=['python-bitcoinlib', 'plyvel'],
|
||||
dependency_links=['http://github.com/arcalinea/python-zcashlib/tarball/master'],
|
||||
packages=find_packages()
|
||||
)
|
||||
|
|
|
@ -7,7 +7,7 @@ from xcat.utils import *
|
|||
from xcat.trades import Contract, Trade
|
||||
import xcat.userInput as userInput
|
||||
import xcat.db as db
|
||||
from xcatconf import *
|
||||
from xcat.xcatconf import *
|
||||
|
||||
def find_secret_from_fundtx(currency, p2sh, fundtx):
|
||||
if currency == 'bitcoin':
|
||||
|
|
|
@ -89,7 +89,10 @@ def throw(err):
|
|||
######### xcat.json temp file #############
|
||||
#############################################
|
||||
|
||||
xcatjson = os.path.join(ROOT_DIR, '.tmp/xcat.json')
|
||||
tmp_dir = os.path.join(ROOT_DIR, '.tmp')
|
||||
if not os.path.exists(tmp_dir):
|
||||
os.makedirs(tmp_dir)
|
||||
xcatjson = os.path.join(tmp_dir, 'xcat.json')
|
||||
|
||||
def save_trade(trade):
|
||||
with open(xcatjson, 'w+') as outfile:
|
||||
|
@ -104,8 +107,11 @@ def get_trade():
|
|||
return trade
|
||||
|
||||
def erase_trade():
|
||||
with open(xcatjson, 'w') as outfile:
|
||||
outfile.write('')
|
||||
try:
|
||||
with open(xcatjson, 'w') as outfile:
|
||||
outfile.write('')
|
||||
except:
|
||||
pass
|
||||
|
||||
def save(trade):
|
||||
print("Saving trade")
|
||||
|
|
Loading…
Reference in New Issue