From f355fb75f1d6e14afc655fe0f776764db80577e1 Mon Sep 17 00:00:00 2001 From: Joseph Pillatsch Date: Fri, 19 Jan 2018 20:49:32 -0600 Subject: [PATCH] Mac installation works great - added setup-mac.sh and updated readme --- README.rst | 62 +++++++++++++++++++++++++++++++--------------------- setup-mac.sh | 22 +++++++++++++++++++ 2 files changed, 59 insertions(+), 25 deletions(-) create mode 100755 setup-mac.sh diff --git a/README.rst b/README.rst index a05d406c..44b90f01 100644 --- a/README.rst +++ b/README.rst @@ -26,10 +26,8 @@ Getting started =============== Electrum is a pure python application. If you want to use the -Qt interface, install the Qt dependencies:: +Qt interface, install the Qt dependencies. - sudo apt-get install python3-pyqt5 - sudo pip2 install pyblake2 If you downloaded the official package (tar.gz), you can run Electrum from its root directory, without installing it on your @@ -38,13 +36,6 @@ directory. To run Electrum from its root directory, just do:: ./electrum -You can also install Electrum on your system, by running this command:: - - sudo apt-get install python3-setuptools - python3 setup.py install - -This will download and install the Python dependencies used by -Electrum, instead of using the 'packages' directory. If you cloned the git repository, you need to compile extra files before you can run Electrum. Read the next section, "Development @@ -60,31 +51,53 @@ Check out the code from Github:: git clone git://github.com/spesmilo/electrum.git cd electrum -Run install (this should install dependencies):: - - python3 setup.py install - -**And then...** - For Mac: -------- -Copy the newly generated `build/scripts-3.6/electrum` to the Electrum directory:: +Using Homebrew:: + + # Install Homebrew + /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" + + # (Optionally) + sudo chown -R "$USER":admin /usr/local + sudo chown -R "$USER":admin /Library/Caches/Homebrew + + # Install python3 + brew install python3 + brew link python3 + brew postinstall python3 + + # Python setuptools + curl https://bootstrap.pypa.io/ez_setup.py -o - | python3 + + # Install pyqt5 + pip3 install pyqt5 + + # Setup + python3 setup.py install + pyrcc5 icons.qrc -o gui/qt/icons_rc.py + + # Run + ./electrum + +Alternatively, copy the generated `build/scripts-3.6/electrum` to the main directory:: cp -f build/scripts-3.6/electrum electrum-mac - -Compile the icon files for QT:: - - pyrcc5 icons.qrc -o gui/qt/icons_rc.py - -Run:: - ./electrum-mac For Linux: ---------- +Install Dependencies:: + + sudo apt-get install python3-pyqt5 + sudo pip2 install pyblake2 + + sudo apt-get install python3-setuptools + python3 setup.py install + Compile the icons file for QT:: sudo apt-get install pyqt5-dev-tools @@ -133,7 +146,6 @@ Also be sure to check out::: `~/.electrum-zcl/config` has your Electrum connection object. -Creating Binaries ================= diff --git a/setup-mac.sh b/setup-mac.sh new file mode 100755 index 00000000..4cc87035 --- /dev/null +++ b/setup-mac.sh @@ -0,0 +1,22 @@ +#!/bin/bash + +# MacOS build instructions + +/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" + + +# Optionally (this is bad practice but works if you're stuck) +sudo chown -R "$USER":admin /usr/local +sudo chown -R "$USER":admin /Library/Caches/Homebrew + +brew install python3 +brew link python3 +brew postinstall python3 + +# Python setuptools +curl https://bootstrap.pypa.io/ez_setup.py -o - | python3 + +pip3 install pyqt5 + +# Setup +python3 setup.py install