diff --git a/.travis.yml b/.travis.yml index 8ed0348aa5009b371f5754837363789bf3fad36c..1c4be61a970b32f18bd6b016253715156af6e6e7 100644 --- a/.travis.yml +++ b/.travis.yml @@ -57,11 +57,14 @@ before_install: - pip install --upgrade wheel # Set numpy version first, other packages link against it - pip install six nose coverage codecov tox-travis pytest pytest-cov coveralls codacy-coverage parameterized secp256k1 cryptography scrypt + - pip install pycryptodomex pyyaml appdirs pylibscrypt + - pip install ecdsa requests future websocket-client pytz six Click events prettytable script: - tox after_success: + - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then bash util/package-osx.sh; fi - coveralls # - codecov # - python-codacy-coverage -r coverage.xml diff --git a/appveyor.yml b/appveyor.yml index 628122d2696632eb7f6c0190caa29ce4e748c8ed..0fe357a2ab042ef3c7c888fd4c745bd62e89153b 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -85,6 +85,7 @@ after_test: - ps: | # generate sha256 hashes (get-filehash $env:BUILD -algorithm SHA256).Hash | out-file ("{0}.sha256" -f $env:BUILD) -encoding ascii + type ("{0}.sha256" -f $env:BUILD) #(get-filehash beempy.zip -algorithm SHA256).Hash | out-file "beempy.zip.sha256" -encoding ascii diff --git a/beempy-onedir.spec b/beempy-onedir.spec index d88b23b6eae18715f0c7229d4b4f4a8836ac78f8..a916dd5bbb9bf8a6c916cd22fba3828527d77782 100644 --- a/beempy-onedir.spec +++ b/beempy-onedir.spec @@ -45,4 +45,12 @@ coll = COLLECT( name='beempy', strip=False, upx=False -) \ No newline at end of file +) + +if platform.system() == 'Darwin': + info_plist = {'NSHighResolutionCapable': 'True', 'NSPrincipalClass': 'NSApplication'} + app = BUNDLE(exe, + name='beempy.app', + icon='beempy.ico', + bundle_identifier=None + ) \ No newline at end of file diff --git a/beempy-onefile.spec b/beempy-onefile.spec index a05ef965b43c5df0267aa2524de08183ea4d5c29..70a22efdf53a37697b9cfb36a34d7c2a0d68047a 100644 --- a/beempy-onefile.spec +++ b/beempy-onefile.spec @@ -38,3 +38,11 @@ exe = EXE(pyz, console=True, icon='beempy.ico', ) + +if platform.system() == 'Darwin': + info_plist = {'NSHighResolutionCapable': 'True', 'NSPrincipalClass': 'NSApplication'} + app = BUNDLE(exe, + name='beempy.app', + icon='beempy.ico', + bundle_identifier=None + ) \ No newline at end of file diff --git a/util/package-osx.sh b/util/package-osx.sh new file mode 100644 index 0000000000000000000000000000000000000000..8f0cad1095444d1f21ea648cd4a100239df87d24 --- /dev/null +++ b/util/package-osx.sh @@ -0,0 +1,27 @@ +#!/usr/bin/env bash +if [ -z "$CI_BUILD_TAG" ] +then + python setup.py patch_version --platform=osx +fi +VERSION=$(python -c 'import beem; print(beem.__version__)') + +rm -rf dist build locale +pip install +python setup.py clean +python setup.py build_ext +python setup.py build_locales +pip install pyinstaller +pyinstaller beempy-onedir.spec + +cd dist +ditto -rsrc --arch x86_64 'beempy.app' 'beempy.tmp' +rm -r 'beempy.app' +mv 'beempy.tmp' 'beempy.app' +hdiutil create -volname "beempy $VERSION" -srcfolder 'beempy.app' -ov -format UDBZ "beempy $VERSION.dmg" +if [ -n "$UPLOAD_OSX" ] +then + curl --upload-file "beempy $VERSION.dmg" https://transfer.sh/ + # Required for a newline between the outputs + echo -e "\n" + md5 -r "beempy $VERSION.dmg" +fi