diff --git a/.gitignore b/.gitignore index 9c697f60f..5f79ac6c6 100644 --- a/.gitignore +++ b/.gitignore @@ -1,10 +1,13 @@ -app/dist -app/node_modules node_modules LBRY-darwin-x64 dist -lbrynet/build -lbrynet/venv -.#* -build_venv -*.pyc \ No newline at end of file + +/app/dist +/app/node_modules +/build_venv +/lbrynet-daemon/build +/lbrynet-daemon/venv +/.idea + +*.pyc +.#* \ No newline at end of file diff --git a/app/main.js b/app/main.js index 2edf5bb67..d0b72edae 100644 --- a/app/main.js +++ b/app/main.js @@ -121,7 +121,7 @@ function shutdownDaemon() { // TODO: In this case, we didn't start the process so I'm hesitant // to shut it down. We might want to send a stop command // though instead of just letting it run. - console.log('Not killing lbrynet because we did not start it') + console.log('Not killing lbrynet daemon because we did not start it') return } if (win) { diff --git a/appveyor.yml b/appveyor.yml index 6630e3425..21226e5d1 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -22,7 +22,7 @@ install: - npm install - cd .. # create lbrynet-daemon executable - - cd lbrynet + - cd lbrynet-daemon - ps: .\build.ps1 - cd .. # build ui @@ -32,7 +32,7 @@ install: - node_modules\.bin\webpack - ps: Copy-Item dist ..\app\ -recurse - cd .. - - ps: Copy-Item lbrynet\dist\lbrynet-daemon.exe app\dist + - ps: Copy-Item lbrynet-daemon\dist\lbrynet-daemon.exe app\dist build_script: # build electron app diff --git a/build.sh b/build.sh index f00116542..881c21264 100755 --- a/build.sh +++ b/build.sh @@ -4,6 +4,8 @@ set -o xtrace set -eu ROOT="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" +cd "$ROOT" + if [ "$(uname)" == "Darwin" ]; then ICON="$ROOT/build/icon.icns" else @@ -11,9 +13,7 @@ else fi FULL_BUILD="${FULL_BUILD:-false}" -if [ -n "${TEAMCITY_VERSION:-}" ]; then - FULL_BUILD="true" -elif [ -n "${APPVEYOR:-}" ]; then +if [ -n "${TEAMCITY_VERSION:-}" -o -n "${APPVEYOR:-}" ]; then FULL_BUILD="true" fi @@ -30,18 +30,19 @@ if [ "$FULL_BUILD" == "true" ]; then source "$VENV/bin/activate" set -u pip install -U pip setuptools pyinstaller - python set_version.py - python set_build.py + python "$ROOT/set_version.py" + python "$ROOT/set_build.py" fi npm install -pushd $ROOT/app -npm install -popd +( + cd "$ROOT/app" + npm install +) ( - cd "$ROOT/lbrynet" - pip install -r posix.txt + cd "$ROOT/lbrynet-daemon" + pip install -r linux_macos.txt pyinstaller -y lbry.onefile.spec ) @@ -54,7 +55,7 @@ popd cp -r dist "$ROOT/app/dist" ) -mv "$ROOT/lbrynet/dist/lbrynet-daemon" "$ROOT/app/dist" +mv "$ROOT/lbrynet-daemon/dist/lbrynet-daemon" "$ROOT/app/dist" if [ "$FULL_BUILD" == "true" ]; then diff --git a/lbrynet/build.ps1 b/lbrynet-daemon/build.ps1 similarity index 100% rename from lbrynet/build.ps1 rename to lbrynet-daemon/build.ps1 diff --git a/lbrynet-daemon/gmpy-1.17-cp27-none-win32.whl b/lbrynet-daemon/gmpy-1.17-cp27-none-win32.whl new file mode 100644 index 000000000..5d15f0efa Binary files /dev/null and b/lbrynet-daemon/gmpy-1.17-cp27-none-win32.whl differ diff --git a/lbrynet/lbry.onefile.spec b/lbrynet-daemon/lbry.onefile.spec similarity index 96% rename from lbrynet/lbry.onefile.spec rename to lbrynet-daemon/lbry.onefile.spec index 40eabec53..58a3a4174 100644 --- a/lbrynet/lbry.onefile.spec +++ b/lbrynet-daemon/lbry.onefile.spec @@ -6,7 +6,7 @@ import lbryum cwd = os.getcwd() -if os.path.basename(cwd) != 'lbrynet': +if os.path.basename(cwd) != 'lbrynet-daemon': raise Exception('The build needs to be run from the same directory as the spec file') repo_base = os.path.abspath(os.path.join(cwd, '..')) diff --git a/lbrynet/lbry.py b/lbrynet-daemon/lbry.py similarity index 100% rename from lbrynet/lbry.py rename to lbrynet-daemon/lbry.py diff --git a/lbrynet/posix.txt b/lbrynet-daemon/linux_macos.txt similarity index 100% rename from lbrynet/posix.txt rename to lbrynet-daemon/linux_macos.txt diff --git a/lbrynet/requirements.txt b/lbrynet-daemon/requirements.txt similarity index 88% rename from lbrynet/requirements.txt rename to lbrynet-daemon/requirements.txt index 6bfdc7169..d96cf5a5d 100644 --- a/lbrynet/requirements.txt +++ b/lbrynet-daemon/requirements.txt @@ -10,7 +10,7 @@ googlefinance==0.7 jsonrpc==1.2 jsonrpclib==0.1.7 jsonschema==2.5.1 -# for electron, we install lbryum, lbrynet using submodules +# for electron, we install lbryum, lbry using submodules ../lbryum ../lbry pbkdf2==1.3 diff --git a/lbrynet/windows.txt b/lbrynet-daemon/windows.txt similarity index 100% rename from lbrynet/windows.txt rename to lbrynet-daemon/windows.txt diff --git a/release.py b/release.py index 1ec3d17ea..f30298aaa 100644 --- a/release.py +++ b/release.py @@ -158,7 +158,7 @@ def is_behind(base, branch): def check_bumpversion(): - def requireNewVersion(): + def require_new_version(): print 'Install bumpversion: pip install -U git+https://github.com/lbryio/bumpversion.git' sys.exit(1) @@ -166,9 +166,9 @@ def check_bumpversion(): output = subprocess.check_output(['bumpversion', '-v'], stderr=subprocess.STDOUT) output = output.strip() if output != 'bumpversion 0.5.4-lbry': - requireNewVersion() + require_new_version() except (subprocess.CalledProcessError, OSError) as err: - requireNewVersion() + require_new_version() def get_part(args, name): diff --git a/release_on_tag.py b/release_on_tag.py index cd0eb60c9..a8fa731ad 100644 --- a/release_on_tag.py +++ b/release_on_tag.py @@ -1,15 +1,11 @@ -import argparse import glob import json import logging import os import platform -import random -import re import subprocess import sys - import github import requests import uritemplate @@ -17,8 +13,7 @@ import uritemplate from lbrynet.core import log_support -def main(args=None): - current_tag = None +def main(): try: current_tag = subprocess.check_output( ['git', 'describe', '--exact-match', 'HEAD']).strip() @@ -133,7 +128,7 @@ def _curl_uploader(upload_uri, asset_to_upload, token): '--data-binary', '@-', upload_uri ] - #'-d', '{"some_key": "some_value"}', + # '-d', '{"some_key": "some_value"}', print 'Calling curl:' print cmd print diff --git a/set_build.py b/set_build.py index d9ebff51a..3467154ab 100644 --- a/set_build.py +++ b/set_build.py @@ -1,6 +1,5 @@ """Set the build version to be 'dev', 'qa', 'rc', 'release'""" -import json import os.path import re import subprocess diff --git a/zip_daemon.py b/zip_daemon.py index db118f051..246df0070 100644 --- a/zip_daemon.py +++ b/zip_daemon.py @@ -19,9 +19,9 @@ def main(): def get_system_label(): system = platform.system() if system == 'Darwin': - return 'macOS' + return 'macos' else: - return system + return system.lower() if __name__ == '__main__':