diff --git a/.gitignore b/.gitignore index b4b5438..c08d1ce 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ *.pyc xcat.egg-info/ .tmp/ +venv/ diff --git a/README.md b/README.md index 9fb31c2..2836fac 100644 --- a/README.md +++ b/README.md @@ -24,11 +24,12 @@ git clone https://github.com/zcash/zbxcat.git pip install zbxcat ``` -To install python-zcashlib from github: +Install the dependencies. Note that this package depends on the experimental [python-zcashlib package](https://github.com/arcalinea/python-zcashlib). ``` -easy_install http://github.com/arcalinea/python-zcashlib/tarball/master +pip install -r requirements.txt ``` + Run Zcash and Bitcoin daemons locally, on whichever network you want to trade on (recommended: testnet, regtest). Make sure the rpcuser and rpcpassword values are set in your zcash.conf or bitcoin.conf files. diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..96bd29e --- /dev/null +++ b/requirements.txt @@ -0,0 +1,2 @@ +git+https://github.com/arcalinea/python-zcashlib.git#egg=zcash +python-bitcoinlib diff --git a/setup.py b/setup.py index 99c2fbf..dba1c34 100644 --- a/setup.py +++ b/setup.py @@ -5,15 +5,18 @@ from xcat import version setup( name="xcat", version=version, - entry_points = { - "console_scripts": ['xcat = xcat.cli:main'] + entry_points={ + "console_scripts": ['xcat = xcat.cli:main'] }, - description="Xcat is a package that creates cross-chain atomic transactions.", + description=("Xcat is a package that " + "creates cross-chain atomic transactions."), author="arcalinea and arielgabizon", author_email="info@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'], + dependency_links=[ + 'http://github.com/arcalinea/python-zcashlib/tarball/master' + ], packages=find_packages() ) diff --git a/xcat/tests/test_cli.py b/xcat/tests/test_cli.py index 5a8cb77..7fb8367 100644 --- a/xcat/tests/test_cli.py +++ b/xcat/tests/test_cli.py @@ -4,6 +4,7 @@ import xcat.db as db from xcat.tests.utils import mktrade from xcat.trades import Trade, Contract + class SimpleTestCase(unittest.TestCase): def setUp(self): self.trade = mktrade() @@ -15,6 +16,7 @@ class SimpleTestCase(unittest.TestCase): def test_importtrade(self): trade = cli.importtrade('test', self.__class__.hexstr) + class CliTest(SimpleTestCase): def test_findtrade(self): trade = cli.findtrade('test') @@ -47,5 +49,6 @@ class CliTest(SimpleTestCase): # status = cli.buyer_check_status(trade) # self.assertEqual(status, 'sellerFunded') + if __name__ == '__main__': unittest.main()