Browse Source

Merge pull request #47 from eduard6/setup-pip

Small setup and install doc changes
master
Adam Gibson 9 years ago committed by GitHub
parent
commit
178b71d272
  1. 1
      .gitignore
  2. 22
      docs/INSTALL.md
  3. 3
      scripts/logs/.gitignore
  4. 15
      setupall.py

1
.gitignore vendored

@ -1,5 +1,6 @@
*.pyc
*.swp
*.egg-info
.cache/
.coverage
blockchain.cache

22
docs/INSTALL.md

@ -20,8 +20,9 @@ automake pkg-config libtool libffi-dev libssl-dev
Then:
sudo pip install virtualenv
sudo pip install virtualenv service-identity
mkdir jmvenv
virtualenv jmvenv
cd jmvenv; source bin/activate; cd ..
Install this repo in the virtualenv:
@ -63,3 +64,22 @@ There, you need to install the client code (without Joinmarket's bitcoin):
python setupall.py --client-only
#### Upgrading
After upgrading to a new version (or whenever the code has changed) you must re-run the
applicable `python setupall.py` commands as described above.
#### Development (or making other changes to the code)
If you are a developer or you plan on modifying the code (for example to add customizations),
do not run the `python setupall.py` commands above. Instead run:
python setupall.py --develop
The normal installation (`--daemon` or `--client-bitcoin`) would install the JoinMarket
packages to the virtualenv's `site-packages` directory. This would mean any changes you make to
the local code would not have effect until the packages are reinstalled.
Using `--develop` causes a `.egg-link` file to be added to `site-packages` for each package.
The `.egg-link` file acts like a symlink pointing to the local code. This means any changes you
make to the code will have effect immediately.

3
scripts/logs/.gitignore vendored

@ -1,4 +1,5 @@
# Ignore all logs
*.log
*.schedule
# Except this file
!.gitignore
!.gitignore

15
setupall.py

@ -20,7 +20,9 @@ def help():
"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.")
"`--client-bitcoin` - using joinmarket bitcoin code, installs secp256k1\n"
"`--develop` - uses the local code for all packages (does not install to site-packages)."
)
sys.exit(0)
if len(sys.argv) != 2:
@ -32,11 +34,18 @@ mode = sys.argv[1]
packages = {"--daemon": ["jmbase", "jmdaemon"],
"--client-only": ["jmbase", "jmclient"],
"--client-bitcoin": ["jmbase", "jmbitcoin", "jmclient"]}
"--client-bitcoin": ["jmbase", "jmbitcoin", "jmclient"],
"--develop": ["jmbase", "jmbitcoin", "jmclient", "jmdaemon"]}
if mode not in packages:
help()
for x in packages[mode]:
dirtorun = os.path.join(curdir, x)
p = subprocess.Popen(['pip', 'install', '.'], cwd=dirtorun)
cmd = ['pip', 'install', '--upgrade']
if mode == "--develop":
cmd.append('-e')
cmd.append('.')
p = subprocess.Popen(cmd, cwd=dirtorun)
p.wait()

Loading…
Cancel
Save