Browse Source

refactor dir structure for new setupall script

master
Adam Gibson 9 years ago
parent
commit
d171681f31
No known key found for this signature in database
GPG Key ID: B3AE09F1E9A3197A
  1. 6
      README.md
  2. 0
      jmbase/jmbase/__init__.py
  3. 0
      jmbase/jmbase/bigstring.py
  4. 0
      jmbase/jmbase/commands.py
  5. 0
      jmbase/jmbase/support.py
  6. 13
      jmbase/setup.py
  7. 0
      jmbitcoin/jmbitcoin/__init__.py
  8. 0
      jmbitcoin/jmbitcoin/bci.py
  9. 0
      jmbitcoin/jmbitcoin/secp256k1_deterministic.py
  10. 0
      jmbitcoin/jmbitcoin/secp256k1_main.py
  11. 0
      jmbitcoin/jmbitcoin/secp256k1_transaction.py
  12. 13
      jmbitcoin/setup.py
  13. 0
      jmclient/jmclient/__init__.py
  14. 0
      jmclient/jmclient/blockchaininterface.py
  15. 0
      jmclient/jmclient/btc.py
  16. 0
      jmclient/jmclient/client_protocol.py
  17. 0
      jmclient/jmclient/commitment_utils.py
  18. 0
      jmclient/jmclient/configure.py
  19. 0
      jmclient/jmclient/jsonrpc.py
  20. 0
      jmclient/jmclient/old_mnemonic.py
  21. 0
      jmclient/jmclient/podle.py
  22. 0
      jmclient/jmclient/schedule.py
  23. 0
      jmclient/jmclient/slowaes.py
  24. 0
      jmclient/jmclient/socks.py
  25. 0
      jmclient/jmclient/support.py
  26. 0
      jmclient/jmclient/taker.py
  27. 0
      jmclient/jmclient/wallet.py
  28. 13
      jmclient/setup.py
  29. 0
      jmdaemon/jmdaemon/__init__.py
  30. 0
      jmdaemon/jmdaemon/daemon_protocol.py
  31. 0
      jmdaemon/jmdaemon/enc_wrapper.py
  32. 0
      jmdaemon/jmdaemon/irc.py
  33. 0
      jmdaemon/jmdaemon/message_channel.py
  34. 0
      jmdaemon/jmdaemon/orderbookwatch.py
  35. 0
      jmdaemon/jmdaemon/protocol.py
  36. 0
      jmdaemon/jmdaemon/socks.py
  37. 13
      jmdaemon/setup.py
  38. 40
      setup.py
  39. 42
      setupall.py

6
README.md

@ -39,13 +39,13 @@ Next, you can install in 3 different modes:
1. For the "backend", a daemon, install: 1. For the "backend", a daemon, install:
`python setup.py --backend install` `python setupall.py --daemon`
Then, you can run the daemon with `cd scripts; python joinmarketd.py <port number>` Then, you can run the daemon with `cd scripts; python joinmarketd.py <port number>`
2. For the client code, using joinmarket's own bitcoin library on the command line: 2. For the client code, using joinmarket's own bitcoin library on the command line:
`python setup.py --client-bitcoin install` `python setupall.py --client-bitcoin`
If you have installed this "full" version of the client, you can use it with the If you have installed this "full" version of the client, you can use it with the
command line scripts as explained in the [scripts README](https://github.com/AdamISZ/joinmarket-clientserver/tree/master/scripts). command line scripts as explained in the [scripts README](https://github.com/AdamISZ/joinmarket-clientserver/tree/master/scripts).
@ -53,7 +53,7 @@ command line scripts as explained in the [scripts README](https://github.com/Ada
3. For the client code, using another bitcoin backend library (currently only Electrum 3. For the client code, using another bitcoin backend library (currently only Electrum
supported, see https://github.com/AdamISZ/electrum-joinmarket-plugin for details): supported, see https://github.com/AdamISZ/electrum-joinmarket-plugin for details):
`python setup.py --client-only install` `python setupall.py --client-only`
You can then access the library via `import jmclient`. In particular the You can then access the library via `import jmclient`. In particular the
jmclient.Taker class must be instantiated. jmclient.Taker class must be instantiated.

0
jmbase/__init__.py → jmbase/jmbase/__init__.py

0
jmbase/bigstring.py → jmbase/jmbase/bigstring.py

0
jmbase/commands.py → jmbase/jmbase/commands.py

0
jmbase/support.py → jmbase/jmbase/support.py

13
jmbase/setup.py

@ -0,0 +1,13 @@
from setuptools import setup
setup(name='joinmarketbase',
version='0.1',
description='Joinmarket client library for Bitcoin coinjoins',
url='http://github.com/AdamISZ/joinmarket-clientserver/jmbase',
author='Adam Gibson',
author_email='ekaggata@gmail.com',
license='GPL',
packages=['jmbase'],
install_requires=['twisted',],
zip_safe=False)

0
jmbitcoin/__init__.py → jmbitcoin/jmbitcoin/__init__.py

0
jmbitcoin/bci.py → jmbitcoin/jmbitcoin/bci.py

0
jmbitcoin/secp256k1_deterministic.py → jmbitcoin/jmbitcoin/secp256k1_deterministic.py

0
jmbitcoin/secp256k1_main.py → jmbitcoin/jmbitcoin/secp256k1_main.py

0
jmbitcoin/secp256k1_transaction.py → jmbitcoin/jmbitcoin/secp256k1_transaction.py

13
jmbitcoin/setup.py

@ -0,0 +1,13 @@
from setuptools import setup
setup(name='joinmarketbitcoin',
version='0.1',
description='Joinmarket client library for Bitcoin coinjoins',
url='http://github.com/AdamISZ/joinmarket-clientserver/jmbitcoin',
author='Adam Gibson',
author_email='ekaggata@gmail.com',
license='GPL',
packages=['jmbitcoin'],
install_requires=['secp256k1',],
zip_safe=False)

0
jmclient/__init__.py → jmclient/jmclient/__init__.py

0
jmclient/blockchaininterface.py → jmclient/jmclient/blockchaininterface.py

0
jmclient/btc.py → jmclient/jmclient/btc.py

0
jmclient/client_protocol.py → jmclient/jmclient/client_protocol.py

0
jmclient/commitment_utils.py → jmclient/jmclient/commitment_utils.py

0
jmclient/configure.py → jmclient/jmclient/configure.py

0
jmclient/jsonrpc.py → jmclient/jmclient/jsonrpc.py

0
jmclient/old_mnemonic.py → jmclient/jmclient/old_mnemonic.py

0
jmclient/podle.py → jmclient/jmclient/podle.py

0
jmclient/schedule.py → jmclient/jmclient/schedule.py

0
jmclient/slowaes.py → jmclient/jmclient/slowaes.py

0
jmclient/socks.py → jmclient/jmclient/socks.py

0
jmclient/support.py → jmclient/jmclient/support.py

0
jmclient/taker.py → jmclient/jmclient/taker.py

0
jmclient/wallet.py → jmclient/jmclient/wallet.py

13
jmclient/setup.py

@ -0,0 +1,13 @@
from setuptools import setup
setup(name='joinmarketclient',
version='0.1',
description='Joinmarket client library for Bitcoin coinjoins',
url='http://github.com/AdamISZ/joinmarket-clientserver/jmclient',
author='Adam Gibson',
author_email='ekaggata@gmail.com',
license='GPL',
packages=['jmclient'],
install_requires=['joinmarketbase'],
zip_safe=False)

0
jmdaemon/__init__.py → jmdaemon/jmdaemon/__init__.py

0
jmdaemon/daemon_protocol.py → jmdaemon/jmdaemon/daemon_protocol.py

0
jmdaemon/enc_wrapper.py → jmdaemon/jmdaemon/enc_wrapper.py

0
jmdaemon/irc.py → jmdaemon/jmdaemon/irc.py

0
jmdaemon/message_channel.py → jmdaemon/jmdaemon/message_channel.py

0
jmdaemon/orderbookwatch.py → jmdaemon/jmdaemon/orderbookwatch.py

0
jmdaemon/protocol.py → jmdaemon/jmdaemon/protocol.py

0
jmdaemon/socks.py → jmdaemon/jmdaemon/socks.py

13
jmdaemon/setup.py

@ -0,0 +1,13 @@
from setuptools import setup
setup(name='joinmarketdaemon',
version='0.1',
description='Joinmarket client library for Bitcoin coinjoins',
url='http://github.com/AdamISZ/joinmarket-clientserver/jmdaemon',
author='Adam Gibson',
author_email='ekaggata@gmail.com',
license='GPL',
packages=['jmdaemon'],
install_requires=['libnacl', 'joinmarketbase'],
zip_safe=False)

40
setup.py

@ -1,40 +0,0 @@
from setuptools import setup
import sys
if '--client-only' in sys.argv:
sys.argv.remove('--client-only')
setup(name='joinmarketclient',
version='0.1',
description='Joinmarket client library for Bitcoin coinjoins',
url='http://github.com/Joinmarket-Org/joinmarket-client',
author='Adam Gibson',
author_email='ekaggata@gmail.com',
license='GPL',
packages=['jmbase', 'jmclient'],
install_requires=['twisted',],
zip_safe=False)
elif '--client-bitcoin' in sys.argv:
sys.argv.remove('--client-bitcoin')
setup(name='joinmarketclient',
version='0.1',
description='Joinmarket client library for Bitcoin coinjoins',
url='http://github.com/Joinmarket-Org/joinmarket-client',
author='Adam Gibson',
author_email='ekaggata@gmail.com',
license='GPL',
packages=['jmbase', 'jmbitcoin', 'jmclient'],
install_requires=['twisted', 'secp256k1'],
zip_safe=False)
elif '--backend' in sys.argv:
sys.argv.remove('--backend')
setup(name='joinmarketdaemon',
version='0.1',
description='Joinmarket daemon for Bitcoin coinjoins',
author='Adam Gibson',
author_email='ekaggata@gmail.com',
license='GPL',
packages=['jmbase','jmdaemon'],
install_requires=['libnacl', 'twisted'],
zip_safe=False)
else:
raise Exception("Invalid arguments")

42
setupall.py

@ -0,0 +1,42 @@
#!/usr/bin/env python
from __future__ import print_function
import sys, os, subprocess
"""A script to install in one of 3 modes:
(a) daemon - installs jmbase, jmdaemon
(b) client-only - installs jmbase, jmclient
(c) client-bitcoin - installs jmbase, jmclient, jmbitcoin
Note that b and c are distinct mainly due to the fact that
the latter requires the secp256k1 (libsecp256k1 via the secp256k1-py binding),
which is something that would be an annoyance if you don't need it (wallets).
While only (a) has a similarly annoying dependency on libnacl as the binding
to libsodium.
All modes require and install twisted.
"""
def help():
print("Usage: python setupall.py <mode>\n"
"Mode is one of:\n"
"`--daemon` - for joinmarketd\n"
"`--client-only` - for client not using joinmarket's own bitcoin code\n"
"`--client-bitcoin` - using joinmarket bitcoin code, installs secp256k1.")
sys.exit(0)
if len(sys.argv) != 2:
help()
curdir = os.getcwd()
mode = sys.argv[1]
packages = {"--daemon": ["jmbase", "jmdaemon"],
"--client-only": ["jmbase", "jmclient"],
"--client-bitcoin": ["jmbase", "jmbitcoin", "jmclient"]}
if mode not in packages:
help()
for x in packages[mode]:
dirtorun = os.path.join(curdir, x)
p = subprocess.Popen(['python', 'setup.py', 'install'], cwd=dirtorun)
p.wait()
Loading…
Cancel
Save