Add dependencies to setup, fix file path issues

This commit is contained in:
Jay Graber 2017-08-02 22:34:46 -07:00
parent 29c2249a53
commit d93e2f5691
4 changed files with 12 additions and 4 deletions

View File

@ -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()
)

View File

@ -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':

View File

@ -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")