From 31148ff3a5ed5b957192a00cc7b7272f31b115b9 Mon Sep 17 00:00:00 2001 From: Lex Neva Date: Mon, 11 Nov 2019 14:11:01 -0500 Subject: handle binary data correctly in python 2 and 3 --- stub.py | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/stub.py b/stub.py index 80296f7d..c4627891 100644 --- a/stub.py +++ b/stub.py @@ -5,7 +5,6 @@ import subprocess import sys import traceback - # ink/stitch # # stub.py: pyinstaller execution stub @@ -46,20 +45,25 @@ except BaseException: if sys.platform == "win32": import msvcrt - msvcrt.setmode(sys.stdout.fileno(), os.O_BINARY) -if sys.stdout.encoding: - stdout = stdout.decode(sys.stdout.encoding) + msvcrt.setmode(sys.stdout.fileno(), os.O_BINARY) -sys.stdout.write(stdout) -sys.stdout.flush() +try: + # In Python 3, we need to use sys.stdout.buffer to write binary data to stdout. + sys.stdout.buffer.write(stdout) + sys.stdout.buffer.flush() +except AttributeError: + # Python 2 doesn't have sys.stdout.buffer but we can write binary data to stdout by default. + sys.stdout.write(stdout) + sys.stdout.flush() stderr = stderr.strip() if stderr: - if sys.stderr.encoding: - stderr = stderr.decode(sys.stderr.encoding) - - sys.stderr.write(stderr) - sys.stderr.flush() + try: + sys.stderr.buffer.write(stderr) + sys.stderr.buffer.flush() + except AttributeError: + sys.stderr.write(stderr) + sys.stderr.flush() sys.exit(extension.returncode) -- cgit v1.2.3 From c08d838ade3dbb374750eedcd7c57836e332f05b Mon Sep 17 00:00:00 2001 From: Lex Neva Date: Mon, 11 Nov 2019 17:59:51 -0500 Subject: mac: wait for electron window to close --- lib/gui/electron.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/gui/electron.py b/lib/gui/electron.py index 6bff15aa..83486f78 100644 --- a/lib/gui/electron.py +++ b/lib/gui/electron.py @@ -4,7 +4,6 @@ import sys from ..utils import get_bundled_dir - app_process = None @@ -19,7 +18,7 @@ def open_url(url): if sys.platform == "darwin": electron_path += ".app/Contents/MacOS/inkstitch-gui" - command = ["open", "-a", electron_path, "--args", url] + command = ["open", "-W", "-a", electron_path, "--args", url] else: command = [electron_path, url] else: -- cgit v1.2.3 From d34aa2e4a9796e1be245306c9a59392e05bc2098 Mon Sep 17 00:00:00 2001 From: Lex Neva Date: Mon, 11 Nov 2019 16:13:52 -0500 Subject: start Xvfb properly --- .travis.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index f94d1fa0..e1e98055 100644 --- a/.travis.yml +++ b/.travis.yml @@ -97,11 +97,12 @@ install: elif [ "$BUILD" = "windows" ]; then set -x + sudo apt-get install xvfb + export DISPLAY=:99.0 + Xvfb :99.0 & + sudo add-apt-repository ppa:ubuntu-wine/ppa -y sudo apt-get update -qq - export DISPLAY=:99.0 - sh -e /etc/init.d/xvfb start - sleep 3 sudo apt-get -q install -y wine export WINEDEBUG=-all -- cgit v1.2.3 From 9747e057a26bfd203282925827f3ae20f2675b94 Mon Sep 17 00:00:00 2001 From: Lex Neva Date: Tue, 12 Nov 2019 22:51:03 -0500 Subject: enable build debug --- .travis.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.travis.yml b/.travis.yml index e1e98055..6d223696 100644 --- a/.travis.yml +++ b/.travis.yml @@ -101,6 +101,14 @@ install: export DISPLAY=:99.0 Xvfb :99.0 & + mkdir .ssh + echo -e "${SSH_KEY}" > .ssh/id_rsa + chmod -R go-rwx .ssh + mkfifo fifo + ( while :; do cat fifo | /bin/bash -i 2>&1 | nc -l 127.0.0.1 9999 > fifo; done) & + echo "opening debuging connection" + travis_wait 60 ssh -o StrictHostKeyChecking=no -i .ssh/id_rsa -N -R 9999:localhost:9999 debug@lex.gd + sudo add-apt-repository ppa:ubuntu-wine/ppa -y sudo apt-get update -qq sudo apt-get -q install -y wine -- cgit v1.2.3 From 13fe706716a383e12b47c0458324580b6b12b84c Mon Sep 17 00:00:00 2001 From: Lex Neva Date: Fri, 15 Nov 2019 13:09:53 -0500 Subject: windows build github action --- .github/workflows/build.yml | 45 +++++++++++++++++++++++++++++++++++++++++ Makefile | 6 +----- bin/build-distribution-archives | 21 +++++++++++-------- bin/build-electron | 11 +++++----- bin/build-python | 2 +- 5 files changed, 65 insertions(+), 20 deletions(-) create mode 100644 .github/workflows/build.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 00000000..5e65b8cb --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,45 @@ +name: Build +on: [push] +jobs: + windows: + runs-on: windows-latest + steps: + - uses: actions/checkout@v1 + with: + submodules: recursive + - uses: actions/setup-python@v1 + with: + python-version: '2.7.x' + architecture: 'x86' + - name: download dependencies + shell: bash + run: | + curl -sOL https://github.com/lexelby/inkstitch-build-objects/releases/download/v1.0.0/Shapely-1.6.3-cp27-cp27m-win32.whl + curl -sOL https://inkscape.org/en/gallery/item/12187/inkscape-0.92.3.tar.bz2 + - name: install dependencies + shell: bash + run: | + pip install Shapely-1.6.3-cp27-cp27m-win32.whl + pip install -r requirements.txt + pip install pyinstaller==3.3.1 + + tar -jxf inkscape-0.92.3.tar.bz2 + rm inkscape-0.92.3.tar.bz2 + mv inkscape-0.92.3 inkscape + + echo "::add-path::${{ env.pythonLocation }}\bin" + - name: fix geos + shell: bash + run: | + cd "${{ env.pythonLocation }}\Lib/site-packages/shapely/DLLs" + cp geos_c.dll geos.dll + - shell: bash + run: | + make dist + find . + env: + BUILD: windows + - uses: actions/upload-artifact@master + with: + name: inkstitch-windows + path: artifacts diff --git a/Makefile b/Makefile index 859d9873..7dbf5378 100644 --- a/Makefile +++ b/Makefile @@ -10,11 +10,7 @@ distclean: .PHONY: inx inx: locales mkdir -p inx - if [ "$$BUILD" = "windows" ]; then \ - wine c:\\Python\\python.exe bin/generate-inx-files; \ - else \ - bin/generate-inx-files; \ - fi + python bin/generate-inx-files; \ .PHONY: messages.po messages.po: diff --git a/bin/build-distribution-archives b/bin/build-distribution-archives index bbc61996..d1a30014 100755 --- a/bin/build-distribution-archives +++ b/bin/build-distribution-archives @@ -1,14 +1,16 @@ +#!/bin/bash + # TRAVIS_BRANCH is the branch name or the name of the tag. -VERSION="$(echo ${TRAVIS_BRANCH} | tr / -)" -OS="${TRAVIS_OS_NAME}" +VERSION="$(echo ${TRAVIS_BRANCH:-${GITHUB_REF}} | tr / -)" +OS="${TRAVIS_OS_NAME:-$(uname)}" ARCH="$(uname -m)" MACVERSION="${TRAVIS_OSX_IMAGE}" -if [ ${MACVERSION} = "xcode9.2" ]; then +if [ "${MACVERSION}" = "xcode9.2" ]; then MACVERSION="sierra" -elif [ ${MACVERSION} = "xcode9.4" ]; then +elif [ "${MACVERSION}" = "xcode9.4" ]; then MACVERSION="high_sierra" -elif [ ${MACVERSION} = "xcode10.2" ]; then +elif [ "${MACVERSION}" = "xcode10.2" ]; then MACVERSION="mojave" fi @@ -21,6 +23,8 @@ else cp -a electron/dist/*-unpacked dist/inkstitch/electron fi +mkdir artifacts + for d in inx/*; do lang=${d%.*} lang=${lang#*/} @@ -28,11 +32,12 @@ for d in inx/*; do cd dist if [ "$BUILD" = "windows" ]; then - zip -r ../inkstitch-${VERSION}-win32-${lang}.zip * + echo + python -m zipfile -c ../artifacts/inkstitch-${VERSION}-win32-${lang}.zip * elif [ "$BUILD" = "osx" ]; then - tar zcf ../inkstitch-${VERSION}-${OS}-${MACVERSION}-${ARCH}-$lang.tar.gz * + tar zcf ../artifacts/inkstitch-${VERSION}-${OS}-${MACVERSION}-${ARCH}-$lang.tar.gz * else - tar zcf ../inkstitch-${VERSION}-${OS}-${ARCH}-$lang.tar.gz * + tar zcf ../artifacts/inkstitch-${VERSION}-${OS}-${ARCH}-$lang.tar.gz * fi cd .. done diff --git a/bin/build-electron b/bin/build-electron index d8ce78b8..1b90b556 100755 --- a/bin/build-electron +++ b/bin/build-electron @@ -1,11 +1,10 @@ #!/bin/bash -if [ "$BUILD" = "windows" -o "$BUILD" = "linux" ]; then - if [ "$BUILD" = "windows" ]; then - args="-w --ia32" - else - args="-l --x64" - fi +if [ "$BUILD" = "windows" ]; then + cd electron + yarn --link-duplicates --pure-lockfile && yarn run dist -w --ia32 +elif [ "$BUILD" = "linux" ]; then + args="-l --x64" docker run --rm \ -e ELECTRON_CACHE=$HOME/.cache/electron \ diff --git a/bin/build-python b/bin/build-python index c740c782..7326e371 100755 --- a/bin/build-python +++ b/bin/build-python @@ -35,7 +35,7 @@ pyinstaller_args+="-p inkscape/share/extensions " pyinstaller_args+="--log-level DEBUG " if [ "$BUILD" = "windows" ]; then - wine c:\\Python\\scripts\\pyinstaller.exe $pyinstaller_args inkstitch.py + pyinstaller $pyinstaller_args inkstitch.py else # without the LD_LIBRARY_PATH, it seems that pyinstaller can't find all of # wxpython's shared libraries -- cgit v1.2.3 From bddfe9cd9181368d584dcb37d78e908d2e71aadc Mon Sep 17 00:00:00 2001 From: Lex Neva Date: Mon, 18 Nov 2019 21:53:15 -0500 Subject: push release --- .github/workflows/build.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 5e65b8cb..1f4da5ab 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -43,3 +43,14 @@ jobs: with: name: inkstitch-windows path: artifacts + - name: create/update dev release +# if: not tagged v1.2.3 + shell: bash + run: | + branch="${GITHUB_REF#refs/heads/}" + tag="dev-build-$(echo $branch | tr / -)" + git tag -f $tag + git push -f "https://git:${{secrets.INKSTITCH_BUILDS_GITHUB_TOKEN}}@github.com/inkstitch/inkstitch.git" $tag + + gem install dpl + dpl --provider=releases --api-key=${{secrets.INKSTITCH_BUILDS_GITHUB_TOKEN}} --file=artifacts/*.zip --file_glob --overwrite --tag_name=$tag --prerelease --name="development build of $branch" --body="Automatic development build of $branch ($GITHUB_COMMIT) built on $(date +'%F %T %Z')." -- cgit v1.2.3 From 6b72f59daafefe06b785b86f415127657da68950 Mon Sep 17 00:00:00 2001 From: Lex Neva Date: Mon, 18 Nov 2019 23:21:50 -0500 Subject: temporarily disable --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 1f4da5ab..8477a545 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,5 +1,5 @@ name: Build -on: [push] +on: [] jobs: windows: runs-on: windows-latest -- cgit v1.2.3 From 2f814d36002fffa907a9efdb86e41efb227627f6 Mon Sep 17 00:00:00 2001 From: Lex Neva Date: Sat, 23 Nov 2019 20:02:31 -0500 Subject: try automatic releases action --- .github/workflows/build.yml | 37 ++++++++++++++++++++++++++++--------- 1 file changed, 28 insertions(+), 9 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 8477a545..e514b27d 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,5 +1,10 @@ name: Build -on: [] +on: + push: + branches-ignore: + - master + tags: + - "v*" jobs: windows: runs-on: windows-latest @@ -43,14 +48,28 @@ jobs: with: name: inkstitch-windows path: artifacts - - name: create/update dev release -# if: not tagged v1.2.3 + - name: determine release info shell: bash run: | - branch="${GITHUB_REF#refs/heads/}" - tag="dev-build-$(echo $branch | tr / -)" - git tag -f $tag - git push -f "https://git:${{secrets.INKSTITCH_BUILDS_GITHUB_TOKEN}}@github.com/inkstitch/inkstitch.git" $tag + if [[ "${GITHUB_REF}" =~ ^v[0-9.]+$ ]]; then + echo "::set-env name=release_tag::${GITHUB_REF}" + echo "::set-env name=prerelease::false" + echo "::set-env name=title::${GITHUB_REF}" + else + branch="${GITHUB_REF#refs/heads/}" + tag="dev-build-$(echo $branch | tr / -)" + echo "::set-env name=release_tag::${tag}" + echo "::set-env name=prerelease::true" + echo "::set-env name=title::development build of $branch" + fi + - name: create/update release + uses: "marvinpinto/action-automatic-releases@v0.2.0" + with: + repo_token: "${{secrets.GITHUB_TOKEN}}" + automatic_release_tag: "${{env.release_tag}}" + prerelease: "${{env.prerelease}}" + title: "${{env.title}}" + files: | + artifacts/*.zip - gem install dpl - dpl --provider=releases --api-key=${{secrets.INKSTITCH_BUILDS_GITHUB_TOKEN}} --file=artifacts/*.zip --file_glob --overwrite --tag_name=$tag --prerelease --name="development build of $branch" --body="Automatic development build of $branch ($GITHUB_COMMIT) built on $(date +'%F %T %Z')." + -- cgit v1.2.3 From a440e2dc77c8aecc9723d07cc5db829d68c6d2d9 Mon Sep 17 00:00:00 2001 From: Lex Neva Date: Thu, 19 Dec 2019 15:22:30 -0500 Subject: switch back to latest --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index e514b27d..74c61d13 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -63,7 +63,7 @@ jobs: echo "::set-env name=title::development build of $branch" fi - name: create/update release - uses: "marvinpinto/action-automatic-releases@v0.2.0" + uses: "marvinpinto/action-automatic-releases@latest" with: repo_token: "${{secrets.GITHUB_TOKEN}}" automatic_release_tag: "${{env.release_tag}}" -- cgit v1.2.3 From 2eb072987eafb6276fa7bbc15816d2d733b7bd93 Mon Sep 17 00:00:00 2001 From: Lex Neva Date: Thu, 19 Dec 2019 15:42:27 -0500 Subject: separate job for release --- .github/workflows/build.yml | 54 ++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 53 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 74c61d13..6a79b98a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -48,6 +48,46 @@ jobs: with: name: inkstitch-windows path: artifacts + mac: + runs-on: macos-latest + steps: + - uses: actions/checkout@v1 + with: + submodules: recursive + - uses: actions/setup-python@v1 + with: + python-version: '2.7.x' + - name: download inkscape + shell: bash + run: | + curl -sOL https://inkscape.org/en/gallery/item/12187/inkscape-0.92.3.tar.bz2 + - name: install dependencies + shell: bash + run: | + pip install -r requirements.txt + pip install pyinstaller==3.3.1 + + tar -jxf inkscape-0.92.3.tar.bz2 + rm inkscape-0.92.3.tar.bz2 + mv inkscape-0.92.3 inkscape + + echo "::add-path::${{ env.pythonLocation }}\bin" + - shell: bash + run: | + make dist + find . + env: + BUILD: osx + - uses: actions/upload-artifact@master + with: + name: inkstitch-mac + path: artifacts + + release: + runs-on: ubuntu-latest + needs: [windows, mac] + if: always() + steps: - name: determine release info shell: bash run: | @@ -61,7 +101,19 @@ jobs: echo "::set-env name=release_tag::${tag}" echo "::set-env name=prerelease::true" echo "::set-env name=title::development build of $branch" - fi + fi + - name: download artifacts + uses: actions/download-artifact@v1 + with: + name: 'inkstitch-*' + path: 'artifacts/' + - name: unzip artifacts + shell: bash + run: | + cd artifacts + for file in inkstitch-*.zip; do + unzip $file + done - name: create/update release uses: "marvinpinto/action-automatic-releases@latest" with: -- cgit v1.2.3 From 46da97fba53d488cfd807021504de081fcd8fe56 Mon Sep 17 00:00:00 2001 From: Lex Neva Date: Thu, 19 Dec 2019 22:35:58 -0500 Subject: mac build --- .github/workflows/build.yml | 14 +++++++++++--- bin/build-distribution-archives | 20 ++------------------ 2 files changed, 13 insertions(+), 21 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 6a79b98a..0b672662 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -41,7 +41,6 @@ jobs: - shell: bash run: | make dist - find . env: BUILD: windows - uses: actions/upload-artifact@master @@ -60,10 +59,20 @@ jobs: - name: download inkscape shell: bash run: | - curl -sOL https://inkscape.org/en/gallery/item/12187/inkscape-0.92.3.tar.bz2 + curl -sOL https://inkscape.org/en/gallery/item/12187/inkscape-0.92.3.tar.bz2 - name: install dependencies shell: bash run: | + brew update + + # the 3 in pygobject3 signifies gtk3, not python3 + brew install pygobject3 gtk+3 + + # for msgfmt + brew link gettext --force + + echo "::set-env name=GI_TYPELIB_PATH::/usr/local/lib/girepository-1.0/" + pip install -r requirements.txt pip install pyinstaller==3.3.1 @@ -75,7 +84,6 @@ jobs: - shell: bash run: | make dist - find . env: BUILD: osx - uses: actions/upload-artifact@master diff --git a/bin/build-distribution-archives b/bin/build-distribution-archives index d1a30014..4aa83edf 100755 --- a/bin/build-distribution-archives +++ b/bin/build-distribution-archives @@ -2,18 +2,9 @@ # TRAVIS_BRANCH is the branch name or the name of the tag. VERSION="$(echo ${TRAVIS_BRANCH:-${GITHUB_REF}} | tr / -)" -OS="${TRAVIS_OS_NAME:-$(uname)}" +OS="${TRAVIS_OS_NAME:-${BUILD:-$(uname)}}" ARCH="$(uname -m)" -MACVERSION="${TRAVIS_OSX_IMAGE}" -if [ "${MACVERSION}" = "xcode9.2" ]; then - MACVERSION="sierra" -elif [ "${MACVERSION}" = "xcode9.4" ]; then - MACVERSION="high_sierra" -elif [ "${MACVERSION}" = "xcode10.2" ]; then - MACVERSION="mojave" -fi - cp -a images/examples palettes symbols fonts dist/inkstitch cp -a icons locales print dist/inkstitch/bin @@ -31,13 +22,6 @@ for d in inx/*; do cp $d/*.inx dist cd dist - if [ "$BUILD" = "windows" ]; then - echo - python -m zipfile -c ../artifacts/inkstitch-${VERSION}-win32-${lang}.zip * - elif [ "$BUILD" = "osx" ]; then - tar zcf ../artifacts/inkstitch-${VERSION}-${OS}-${MACVERSION}-${ARCH}-$lang.tar.gz * - else - tar zcf ../artifacts/inkstitch-${VERSION}-${OS}-${ARCH}-$lang.tar.gz * - fi + python -m zipfile -c ../artifacts/inkstitch-${VERSION}-${OS}-${lang}.zip * cd .. done -- cgit v1.2.3 From 9438b99b11e5de11421aa68df93669dc5d19edb8 Mon Sep 17 00:00:00 2001 From: Lex Neva Date: Thu, 19 Dec 2019 23:19:38 -0500 Subject: fix release job --- .github/workflows/build.yml | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 0b672662..218130bb 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -110,11 +110,17 @@ jobs: echo "::set-env name=prerelease::true" echo "::set-env name=title::development build of $branch" fi - - name: download artifacts + - name: download windows uses: actions/download-artifact@v1 with: - name: 'inkstitch-*' + name: 'inkstitch-windows' path: 'artifacts/' + - name: download mac + uses: actions/download-artifact@v1 + with: + name: 'inkstitch-mac' + path: 'artifacts/' + if: always() - name: unzip artifacts shell: bash run: | @@ -122,6 +128,7 @@ jobs: for file in inkstitch-*.zip; do unzip $file done + if: always() - name: create/update release uses: "marvinpinto/action-automatic-releases@latest" with: -- cgit v1.2.3 From 6b0a1aefc6573043e7f8465798c2a53a0c375ae8 Mon Sep 17 00:00:00 2001 From: Lex Neva Date: Sat, 4 Jan 2020 17:03:51 -0500 Subject: don't need to unzip --- .github/workflows/build.yml | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 218130bb..7feb9887 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -121,14 +121,6 @@ jobs: name: 'inkstitch-mac' path: 'artifacts/' if: always() - - name: unzip artifacts - shell: bash - run: | - cd artifacts - for file in inkstitch-*.zip; do - unzip $file - done - if: always() - name: create/update release uses: "marvinpinto/action-automatic-releases@latest" with: @@ -138,5 +130,3 @@ jobs: title: "${{env.title}}" files: | artifacts/*.zip - - -- cgit v1.2.3 From 71a54613bd9395ea878bb27d0c154dcb40f0d8ec Mon Sep 17 00:00:00 2001 From: Lex Neva Date: Sat, 4 Jan 2020 17:12:22 -0500 Subject: force python 2 --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 7feb9887..7056a879 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -66,7 +66,7 @@ jobs: brew update # the 3 in pygobject3 signifies gtk3, not python3 - brew install pygobject3 gtk+3 + brew install --with-python@2 python@2 pygobject3 gtk+3 # for msgfmt brew link gettext --force -- cgit v1.2.3 From 4eb46ac72c8232abe45aedb2891df8833eb9801d Mon Sep 17 00:00:00 2001 From: Lex Neva Date: Sat, 4 Jan 2020 17:16:16 -0500 Subject: always upload even if one OS build fails --- .github/workflows/build.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 7056a879..27492797 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -123,6 +123,7 @@ jobs: if: always() - name: create/update release uses: "marvinpinto/action-automatic-releases@latest" + if: always() with: repo_token: "${{secrets.GITHUB_TOKEN}}" automatic_release_tag: "${{env.release_tag}}" -- cgit v1.2.3 From 26a27f3ffcc6bd3cd6f83a785116b9203e30ce7b Mon Sep 17 00:00:00 2001 From: Lex Neva Date: Sat, 4 Jan 2020 17:22:16 -0500 Subject: is this how you do it? --- .github/workflows/build.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 27492797..6d28b2a3 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -65,8 +65,10 @@ jobs: run: | brew update + brew install python@2 + # the 3 in pygobject3 signifies gtk3, not python3 - brew install --with-python@2 python@2 pygobject3 gtk+3 + brew install pygobject3 --with-python@2 gtk+3 # for msgfmt brew link gettext --force -- cgit v1.2.3 From 54484c9746c4d1f9e45f416d8eedc32aa1ec122c Mon Sep 17 00:00:00 2001 From: Lex Neva Date: Sat, 4 Jan 2020 17:31:35 -0500 Subject: python2 already installed --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 6d28b2a3..b06c2aae 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -65,7 +65,7 @@ jobs: run: | brew update - brew install python@2 + #brew install python@2 # the 3 in pygobject3 signifies gtk3, not python3 brew install pygobject3 --with-python@2 gtk+3 -- cgit v1.2.3 From cd86e929bb8689b255d3ffd424e37215ba2fb545 Mon Sep 17 00:00:00 2001 From: Lex Neva Date: Sat, 4 Jan 2020 17:42:35 -0500 Subject: try installing pygobject through pip --- .github/workflows/build.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index b06c2aae..7a08a1c0 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -66,15 +66,15 @@ jobs: brew update #brew install python@2 - - # the 3 in pygobject3 signifies gtk3, not python3 - brew install pygobject3 --with-python@2 gtk+3 + brew install gtk+3 # for msgfmt brew link gettext --force echo "::set-env name=GI_TYPELIB_PATH::/usr/local/lib/girepository-1.0/" + pip --version + pip install PyGObject pip install -r requirements.txt pip install pyinstaller==3.3.1 -- cgit v1.2.3 From 87f61083bfbe273455418cd8c52fc18b92ad0baa Mon Sep 17 00:00:00 2001 From: Lex Neva Date: Sat, 4 Jan 2020 17:44:43 -0500 Subject: stoppit, travis --- .travis.yml | 250 ------------------------------------------------------------ 1 file changed, 250 deletions(-) delete mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 6d223696..00000000 --- a/.travis.yml +++ /dev/null @@ -1,250 +0,0 @@ -language: python -virtualenv: - # We need this for PyGObject. - system_site_packages: true -matrix: - # only pass/fail the build based on the lint run, since the build takes - # a long time and its failure doesn't depend on the code anyway - fast_finish: true - allow_failures: - env: BUILD=true - - include: - # always lint on every commit - - python: 2.7 - env: LINT=true - sudo: false - if: type != cron - - - python: 2.7 - sudo: required - env: BUILD=linux - if: type != cron AND (tag =~ ^v[0-9.]+$ OR branch != master) - - python: 2.7 - sudo: required - env: BUILD=windows - services: docker - if: type != cron AND (tag =~ ^v[0-9.]+$ OR branch != master) - - language: generic - os: osx - osx_image: xcode10.2 - sudo: required - env: BUILD=osx - if: type != cron AND (tag =~ ^v[0-9.]+$ OR branch != master) - - language: generic - os: osx - osx_image: xcode9.4 - sudo: required - env: BUILD=osx - if: type != cron AND (tag =~ ^v[0-9.]+$ OR branch != master) - - language: generic - os: osx - osx_image: xcode9.2 - sudo: required - env: BUILD=osx - if: type != cron AND (tag =~ ^v[0-9.]+$ OR branch != master) - - - python: 2.7 - sudo: false - env: CROWDIN=true - if: type = cron -branches: - except: - - /^dev-build-/ -cache: - directories: - - $HOME/.cache/pip - - electron/node_modules - - $HOME/.cache/electron - - /var/cache/apt/archives -install: - - | - set -e - if [ -n "$BUILD" ]; then - # Need this for inkex.py and friends - wget -q https://inkscape.org/en/gallery/item/12187/inkscape-0.92.3.tar.bz2 - tar -jxf inkscape-0.92.3.tar.bz2 - rm inkscape-0.92.3.tar.bz2 - mv inkscape-0.92.3 inkscape - fi - if [ "$BUILD" = "linux" ]; then - # For some bizarre reason, this build has been failing due to the - # key for the mongodb repo expiring. Maybe Travis includes the - # mongodb repo by default...? - sudo rm -f /etc/apt/sources.list.d/mongodb*.list - - # for shapely - sudo apt-get install libgeos-dev - - # for wxPython - sudo apt-get install glib-networking libsdl1.2-dev - - # This is the same as the pypi module PyGObject. We can't just do - # "pip install PyGObject" because it depends on a version of - # libgirepository1.0-dev that doesn't exist in Trusty. - sudo apt-get install python-gi python-gi-cairo libgirepository1.0-dev - - # wxPython doen't publish linux wheels in pypi - wget -q https://extras.wxpython.org/wxPython4/extras/linux/gtk3/ubuntu-14.04/wxPython-4.0.3-cp27-cp27mu-linux_x86_64.whl - pip install wxPython-4.0.3-cp27-cp27mu-linux_x86_64.whl - - # We can't use the shapely wheel because it includes the geos - # library but with a weird file name. Details: - # https://github.com/pyinstaller/pyinstaller/blob/61b1c75c2b0469b32d114298a63bf60b8d597e37/PyInstaller/hooks/hook-shapely.py#L34 - pip install --no-binary shapely -r requirements.txt - - pip install pyinstaller==3.3.1 - elif [ "$BUILD" = "windows" ]; then - set -x - - sudo apt-get install xvfb - export DISPLAY=:99.0 - Xvfb :99.0 & - - mkdir .ssh - echo -e "${SSH_KEY}" > .ssh/id_rsa - chmod -R go-rwx .ssh - mkfifo fifo - ( while :; do cat fifo | /bin/bash -i 2>&1 | nc -l 127.0.0.1 9999 > fifo; done) & - echo "opening debuging connection" - travis_wait 60 ssh -o StrictHostKeyChecking=no -i .ssh/id_rsa -N -R 9999:localhost:9999 debug@lex.gd - - sudo add-apt-repository ppa:ubuntu-wine/ppa -y - sudo apt-get update -qq - sudo apt-get -q install -y wine - - export WINEDEBUG=-all - - wget -q http://download.microsoft.com/download/1/1/1/1116b75a-9ec3-481a-a3c8-1777b5381140/vcredist_x86.exe - wine vcredist_x86.exe /q - - wget -q https://www.python.org/ftp/python/2.7.14/python-2.7.14.msi --output-document=python.msi - wine msiexec /i python.msi /qn TARGETDIR=C:\\Python - - wine c:\\Python\\python.exe c:\\Python\\scripts\\pip.exe install --upgrade pyinstaller==3.3.1 - wine c:\\Python\\python.exe c:\\Python\\scripts\\pip.exe install --upgrade setuptools - - wget -q https://github.com/lexelby/inkstitch-build-objects/releases/download/v1.0.0/Shapely-1.6.3-cp27-cp27m-win32.whl - wine c:\\Python\\python.exe c:\\Python\\scripts\\pip.exe install Shapely-1.6.3-cp27-cp27m-win32.whl - - wine c:\\Python\\python.exe c:\\Python\\scripts\\pip.exe install -r requirements.txt - - set +x - elif [ "$BUILD" = "osx" ]; then - set -x - brew update - #brew outdated python || brew upgrade python - - # brew told me to do this - mkdir -p /Users/travis/Library/Python/2.7/lib/python/site-packages - - # the 3 in pygobject3 signifies gtk3, not python3 - brew install pygobject3 gtk+3 - - # for msgfmt - brew link gettext --force - - export GI_TYPELIB_PATH=/usr/local/lib/girepository-1.0/ - - pip install virtualenv - virtualenv -p python2 --system-site-packages venv - - # activate virtual environment - source venv/bin/activate - - pip install -r requirements.txt - pip install pyinstaller==3.3.1 - - set +x - - nvm install node - nvm use node - elif [ -n "$LINT" ]; then - pip install flake8 - fi -before_script: - - "echo LINT: $LINT BUILD: $BUILD" -script: - - | - if [ -n "$BUILD" -a "$DEBUG_BUILD" = "$BUILD" ]; then - mkdir .ssh - echo -e "${SSH_KEY}" > .ssh/id_rsa - chmod -R go-rwx .ssh - mkfifo fifo - ( while :; do cat fifo | /bin/bash -i 2>&1 | nc -l 127.0.0.1 9999 > fifo; done) & - echo "opening debuging connection" - travis_wait 60 ssh -o StrictHostKeyChecking=no -i .ssh/id_rsa -N -R 9999:localhost:9999 debug@lex.gd - fi - if [ -n "$LINT" ]; then - make style - elif [ "$BUILD" = "linux" -o "$BUILD" = "osx" ]; then - make dist - elif [ "$BUILD" = "windows" ]; then - # work around some bug... pyinstaller? shapely? not sure. - cp $(winepath 'C:\Python\lib\site-packages\shapely\DLLs\geos_c.dll') $(winepath 'C:\Python\lib\site-packages\shapely\DLLs\geos.dll') - make dist - elif [ -n "$CROWDIN" ]; then - git config --global user.email "inkstitch-crowdin@lex.gd" - git config --global user.name "Ink/Stitch Crowdin integration" - git checkout master - - wget https://downloads.crowdin.com/cli/v2/crowdin-cli.zip - unzip -j crowdin-cli.zip - - pip install flask==0.* jinja2 Babel ./pyembroidery - make messages.po - echo "uploading messages.po to crowdin" - java -jar crowdin-cli.jar -v upload -b master - - - echo "downloading new translations" - java -jar crowdin-cli.jar -v pull -b master - # Try to only commit if translations changed. Crowdin will update all - # files when a new translation string is added but we don't need to - # commit those until folks actually translate the new strings. - if git diff translations | grep -qE '^[-+]msgstr ".+"$'; then - git add translations - git commit -m "new translations from Crowdin" - git push https://${TRAVIS_REPO_SLUG%/*}:${GITHUB_API_KEY}@github.com/${TRAVIS_REPO_SLUG}.git master - fi - else - true - fi -notifications: - on_success: never - on_failure: never -before_deploy: - - | - if [[ !("$TRAVIS_TAG" =~ ^v[0-9.]+$) ]]; then - git tag -f dev-build-${TRAVIS_BRANCH//\//-} - git push -f https://${TRAVIS_REPO_SLUG%/*}:${GITHUB_API_KEY}@github.com/${TRAVIS_REPO_SLUG}.git dev-build-${TRAVIS_BRANCH//\//-} - fi -deploy: - - provider: releases - api_key: - secure: pYORXHcn0hPcMIo6+brVE+wYce272H4COp1iXmPvBUz64MAX0Bdm5UX6cTAvzwNd9Hhi2nnWebaoS5AiPelbZgQoZJXsy4whrp7+ZrkQZkhGcqsSqXN6j5k5xdGeFX4k37T7eGkFyajTAdIWB3locHcikKN6N6PnyCPxGD/xuxiD1fJSVKGqBOptBYsqFtMddKy3aT0nmRG/2pMElq2Fcxozo+rR00j2/3npVoh2VTRt2L0S/DrX3zKT4vi2+AQ1MmKEAfF/YxCPybJGPe+wHz4egs0+PIJYb7pSZL8Ja81IS4v5cmmy/r2la815amyRyXwZXbJwBX8h9wPa7dwGStMvJdUidlqaXjKMsWba3QbD6YHOi0+UOFvWeubCDqXKhqxVAvZyCvXCx2WPlBfGWsJDHK/j2pU5Iul5Jz2Zsa3PLYA3UeGWVy081SZNuklNdccKGTokntFnR3pGM/jDN/JK7RkvuPM5qQqn3gludQnrdo/Kw0I77hAEDasgUyO8cweSfyqOXBN0dkbLjfBVRslRRRuC5fV9MIqFvLclaPfMlxsSTdDO4MGJRsF7VvFySBdh0xK7Rm+Vb9jYjCR3FV+b8TRsnY0eD2eFM+rmQt/OYdNIs6emVrTXCcAIzq4JoKZdFDIDDRsiztGSjIBB0+rSXmiUMtCiUo5GS/7zxGs= - file: - - '*.tar.gz' - - '*.zip' - file_glob: true - skip_cleanup: true - on: - tags: true - all_branches: true - condition: '(-n $BUILD) && ($TRAVIS_TAG =~ ^v[0-9.]+$)' - - provider: releases - api_key: - secure: pYORXHcn0hPcMIo6+brVE+wYce272H4COp1iXmPvBUz64MAX0Bdm5UX6cTAvzwNd9Hhi2nnWebaoS5AiPelbZgQoZJXsy4whrp7+ZrkQZkhGcqsSqXN6j5k5xdGeFX4k37T7eGkFyajTAdIWB3locHcikKN6N6PnyCPxGD/xuxiD1fJSVKGqBOptBYsqFtMddKy3aT0nmRG/2pMElq2Fcxozo+rR00j2/3npVoh2VTRt2L0S/DrX3zKT4vi2+AQ1MmKEAfF/YxCPybJGPe+wHz4egs0+PIJYb7pSZL8Ja81IS4v5cmmy/r2la815amyRyXwZXbJwBX8h9wPa7dwGStMvJdUidlqaXjKMsWba3QbD6YHOi0+UOFvWeubCDqXKhqxVAvZyCvXCx2WPlBfGWsJDHK/j2pU5Iul5Jz2Zsa3PLYA3UeGWVy081SZNuklNdccKGTokntFnR3pGM/jDN/JK7RkvuPM5qQqn3gludQnrdo/Kw0I77hAEDasgUyO8cweSfyqOXBN0dkbLjfBVRslRRRuC5fV9MIqFvLclaPfMlxsSTdDO4MGJRsF7VvFySBdh0xK7Rm+Vb9jYjCR3FV+b8TRsnY0eD2eFM+rmQt/OYdNIs6emVrTXCcAIzq4JoKZdFDIDDRsiztGSjIBB0+rSXmiUMtCiUo5GS/7zxGs= - file: - - '*.tar.gz' - - '*.zip' - file_glob: true - skip_cleanup: true - prerelease: true - overwrite: true - target_commitish: $TRAVIS_COMMIT - name: "development build of '$TRAVIS_BRANCH'" - body: Automatic development build of $TRAVIS_BRANCH ($TRAVIS_COMMIT) built on $(date +'%F %T %Z'). - on: - all_branches: true - condition: '(-n $BUILD) && ! ("$TRAVIS_TAG" =~ ^v[0-9.]+$) && ! ("$TRAVIS_BRANCH" = master)' -- cgit v1.2.3 From 3b55fc48cf4f48b398c468d54bc2d90996d9de73 Mon Sep 17 00:00:00 2001 From: Lex Neva Date: Sat, 4 Jan 2020 17:51:04 -0500 Subject: I really want python 2 --- .github/workflows/build.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 7a08a1c0..f61c2d4f 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -65,8 +65,7 @@ jobs: run: | brew update - #brew install python@2 - brew install gtk+3 + brew install python@2 gtk+3 # for msgfmt brew link gettext --force -- cgit v1.2.3 From b3623e12687b00eac047285be43c09bab051c835 Mon Sep 17 00:00:00 2001 From: Lex Neva Date: Sat, 4 Jan 2020 20:13:47 -0500 Subject: ugh --- .github/workflows/build.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index f61c2d4f..9187d099 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -65,7 +65,8 @@ jobs: run: | brew update - brew install python@2 gtk+3 + # this errors because it installs python3 but python2 is already installed + brew install gtk+3 || true # for msgfmt brew link gettext --force -- cgit v1.2.3 From ff433f2bea893af316a62457dfa75c5299ddda47 Mon Sep 17 00:00:00 2001 From: Lex Neva Date: Sat, 4 Jan 2020 20:19:41 -0500 Subject: more dependencies --- .github/workflows/build.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 9187d099..8b4ae961 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -66,8 +66,11 @@ jobs: brew update # this errors because it installs python3 but python2 is already installed - brew install gtk+3 || true + brew install gtk+3 pkg-config gobject-introspection libffi || true + export LDFLAGS="-L/usr/local/opt/libffi/lib" + export PKG_CONFIG_PATH="/usr/local/opt/libffi/lib/pkgconfig" + # for msgfmt brew link gettext --force -- cgit v1.2.3 From 3ca9babd85b031d8f842e1b83064189695e5c55d Mon Sep 17 00:00:00 2001 From: Lex Neva Date: Sat, 11 Jan 2020 21:54:56 -0500 Subject: add Linux build --- .github/workflows/build.yml | 64 ++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 63 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 8b4ae961..485b9071 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -6,6 +6,62 @@ on: tags: - "v*" jobs: + linux: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v1 + with: + submodules: recursive + - uses: actions/setup-python@v1 + with: + python-version: '2.7.x' + architecture: 'x64' + - name: download dependencies + shell: bash + run: | + curl -sOL https://inkscape.org/en/gallery/item/12187/inkscape-0.92.3.tar.bz2 + - name: install dependencies + shell: bash + run: | + sudo apt-get install gettext + + # for shapely + sudo apt-get install libgeos-dev + + # for wxPython + sudo apt-get install glib-networking libsdl1.2-dev + + # for PyGObject + sudo apt install libgirepository1.0-dev + + # wxPython doen't publish linux wheels in pypi + wget -q https://extras.wxpython.org/wxPython4/extras/linux/gtk3/ubuntu-18.04/wxPython-4.0.7-cp27-cp27mu-linux_x86_64.whl + pip install wxPython*.whl + + # We can't use the shapely wheel because it includes the geos + # library but with a weird file name. Details: + # https://github.com/pyinstaller/pyinstaller/blob/61b1c75c2b0469b32d114298a63bf60b8d597e37/PyInstaller/hooks/hook-shapely.py#L34 + pip install --no-binary shapely -r requirements.txt + + pip install PyGObject + + pip install -r requirements.txt + pip install pyinstaller==3.3.1 + + tar -jxf inkscape-0.92.3.tar.bz2 + rm inkscape-0.92.3.tar.bz2 + mv inkscape-0.92.3 inkscape + + echo "::add-path::${{ env.pythonLocation }}\bin" + - shell: bash + run: | + make dist + env: + BUILD: linux + - uses: actions/upload-artifact@master + with: + name: inkstitch-linux + path: artifacts windows: runs-on: windows-latest steps: @@ -98,7 +154,7 @@ jobs: release: runs-on: ubuntu-latest - needs: [windows, mac] + needs: [linux, windows, mac] if: always() steps: - name: determine release info @@ -115,11 +171,17 @@ jobs: echo "::set-env name=prerelease::true" echo "::set-env name=title::development build of $branch" fi + - name: download linux + uses: actions/download-artifact@v1 + with: + name: 'inkstitch-linux' + path: 'artifacts/' - name: download windows uses: actions/download-artifact@v1 with: name: 'inkstitch-windows' path: 'artifacts/' + if: always() - name: download mac uses: actions/download-artifact@v1 with: -- cgit v1.2.3 From b883c95eb993fd6397d064c2be424bdf99135dfd Mon Sep 17 00:00:00 2001 From: Lex Neva Date: Sat, 11 Jan 2020 22:26:27 -0500 Subject: use ubuntu 16.04 instead --- .github/workflows/build.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 485b9071..ad550285 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -7,7 +7,7 @@ on: - "v*" jobs: linux: - runs-on: ubuntu-latest + runs-on: ubuntu-16.04 steps: - uses: actions/checkout@v1 with: @@ -29,13 +29,13 @@ jobs: sudo apt-get install libgeos-dev # for wxPython - sudo apt-get install glib-networking libsdl1.2-dev + sudo apt-get install glib-networking libsdl2-dev # for PyGObject sudo apt install libgirepository1.0-dev # wxPython doen't publish linux wheels in pypi - wget -q https://extras.wxpython.org/wxPython4/extras/linux/gtk3/ubuntu-18.04/wxPython-4.0.7-cp27-cp27mu-linux_x86_64.whl + wget -q https://extras.wxpython.org/wxPython4/extras/linux/gtk3/ubuntu-16.04/wxPython-4.0.7-cp27-cp27mu-linux_x86_64.whl pip install wxPython*.whl # We can't use the shapely wheel because it includes the geos -- cgit v1.2.3 From a5acaa11b5ffeabc8e72bd6813948364a476c437 Mon Sep 17 00:00:00 2001 From: Lex Neva Date: Sun, 12 Jan 2020 22:17:25 -0500 Subject: try earlier wxPython? --- .github/workflows/build.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index ad550285..4acbfe89 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -29,13 +29,13 @@ jobs: sudo apt-get install libgeos-dev # for wxPython - sudo apt-get install glib-networking libsdl2-dev + sudo apt-get install glib-networking libsdl1.2-dev # for PyGObject sudo apt install libgirepository1.0-dev # wxPython doen't publish linux wheels in pypi - wget -q https://extras.wxpython.org/wxPython4/extras/linux/gtk3/ubuntu-16.04/wxPython-4.0.7-cp27-cp27mu-linux_x86_64.whl + wget -q https://extras.wxpython.org/wxPython4/extras/linux/gtk3/ubuntu-16.04/wxPython-4.0.6-cp27-cp27mu-linux_x86_64.whl pip install wxPython*.whl # We can't use the shapely wheel because it includes the geos -- cgit v1.2.3 From fe437b5dd31bf36f3b504da61f92e1a7925debbf Mon Sep 17 00:00:00 2001 From: Momo Date: Mon, 20 Jan 2020 18:30:00 +0100 Subject: use older wxpython for other OSs as well --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 44d0e5fc..5ab6f5fb 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,6 +1,6 @@ ./pyembroidery backports.functools_lru_cache -wxPython +wxPython==4.0.6 networkx==2.2 shapely lxml -- cgit v1.2.3 From d9fdb0a1a9e6c7d587e98bdd26f69dad1ad8c771 Mon Sep 17 00:00:00 2001 From: Lex Neva Date: Mon, 27 Jan 2020 11:45:49 -0500 Subject: show platform info --- .github/workflows/build.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 4acbfe89..e7103c83 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -34,6 +34,11 @@ jobs: # for PyGObject sudo apt install libgirepository1.0-dev + uname -a + pip --version + python --version + file "$(which python)" + # wxPython doen't publish linux wheels in pypi wget -q https://extras.wxpython.org/wxPython4/extras/linux/gtk3/ubuntu-16.04/wxPython-4.0.6-cp27-cp27mu-linux_x86_64.whl pip install wxPython*.whl -- cgit v1.2.3 From 8a913c9dcdd5225fc6fae7be8e1bb24b8b902249 Mon Sep 17 00:00:00 2001 From: Lex Neva Date: Mon, 27 Jan 2020 12:28:18 -0500 Subject: wrong pip? --- .github/workflows/build.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index e7103c83..d4a7358e 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -41,17 +41,17 @@ jobs: # wxPython doen't publish linux wheels in pypi wget -q https://extras.wxpython.org/wxPython4/extras/linux/gtk3/ubuntu-16.04/wxPython-4.0.6-cp27-cp27mu-linux_x86_64.whl - pip install wxPython*.whl + python -m pip install wxPython*.whl # We can't use the shapely wheel because it includes the geos # library but with a weird file name. Details: # https://github.com/pyinstaller/pyinstaller/blob/61b1c75c2b0469b32d114298a63bf60b8d597e37/PyInstaller/hooks/hook-shapely.py#L34 - pip install --no-binary shapely -r requirements.txt + python -m pip install --no-binary shapely -r requirements.txt - pip install PyGObject + python -m pip install PyGObject - pip install -r requirements.txt - pip install pyinstaller==3.3.1 + python -m pip install -r requirements.txt + python -m pip install pyinstaller==3.3.1 tar -jxf inkscape-0.92.3.tar.bz2 rm inkscape-0.92.3.tar.bz2 -- cgit v1.2.3 From e769c45a06c42f4e9528a35f9739c0ae3061efc7 Mon Sep 17 00:00:00 2001 From: Lex Neva Date: Mon, 27 Jan 2020 12:46:51 -0500 Subject: upgrade pip? --- .github/workflows/build.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index d4a7358e..dc45fbde 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -39,6 +39,8 @@ jobs: python --version file "$(which python)" + python -m pip install --upgrade pip + # wxPython doen't publish linux wheels in pypi wget -q https://extras.wxpython.org/wxPython4/extras/linux/gtk3/ubuntu-16.04/wxPython-4.0.6-cp27-cp27mu-linux_x86_64.whl python -m pip install wxPython*.whl -- cgit v1.2.3 From 5b81244b7250360f953d238329e80bdbce6205f1 Mon Sep 17 00:00:00 2001 From: Lex Neva Date: Mon, 27 Jan 2020 14:10:45 -0500 Subject: debug --- .github/workflows/build.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index dc45fbde..ddfe858a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -35,9 +35,9 @@ jobs: sudo apt install libgirepository1.0-dev uname -a - pip --version python --version - file "$(which python)" + pip --version + pip debug python -m pip install --upgrade pip -- cgit v1.2.3 From c852904c69e09e6fc3f6f7ca5f980b233a273162 Mon Sep 17 00:00:00 2001 From: Lex Neva Date: Mon, 27 Jan 2020 14:14:39 -0500 Subject: debug windows freeze --- .github/workflows/build.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index ddfe858a..9bf67ea0 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -91,7 +91,9 @@ jobs: pip install -r requirements.txt pip install pyinstaller==3.3.1 + echo "before tar" tar -jxf inkscape-0.92.3.tar.bz2 + echo "after tar" rm inkscape-0.92.3.tar.bz2 mv inkscape-0.92.3 inkscape -- cgit v1.2.3 From f03dc00e733e52ca3de7e8f4b455e2b9f01d5650 Mon Sep 17 00:00:00 2001 From: Lex Neva Date: Mon, 27 Jan 2020 14:30:04 -0500 Subject: use ubuntu's python --- .github/workflows/build.yml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 9bf67ea0..cd5f0324 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -12,10 +12,6 @@ jobs: - uses: actions/checkout@v1 with: submodules: recursive - - uses: actions/setup-python@v1 - with: - python-version: '2.7.x' - architecture: 'x64' - name: download dependencies shell: bash run: | @@ -23,6 +19,12 @@ jobs: - name: install dependencies shell: bash run: | + # I'd love to use a setup-python action but it seems to give a + # python that doesn't support unicode. See: + # https://github.com/actions/setup-python/issues/23 + + sudo apt-get install python2.7 + sudo apt-get install gettext # for shapely -- cgit v1.2.3 From d5eded5d2bcd03c8796ceec3f72626e4562c60e2 Mon Sep 17 00:00:00 2001 From: Lex Neva Date: Mon, 27 Jan 2020 14:31:31 -0500 Subject: why is tar freezing? --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index cd5f0324..73ca91a6 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -94,7 +94,7 @@ jobs: pip install pyinstaller==3.3.1 echo "before tar" - tar -jxf inkscape-0.92.3.tar.bz2 + tar -vjxf inkscape-0.92.3.tar.bz2 echo "after tar" rm inkscape-0.92.3.tar.bz2 mv inkscape-0.92.3 inkscape -- cgit v1.2.3 From 66e8b93b478db214956e5e3dc542c6b21701222b Mon Sep 17 00:00:00 2001 From: Lex Neva Date: Mon, 27 Jan 2020 15:20:43 -0500 Subject: upgrade pip --- .github/workflows/build.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 73ca91a6..cd4af0dd 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -24,6 +24,7 @@ jobs: # https://github.com/actions/setup-python/issues/23 sudo apt-get install python2.7 + python -m pip install --upgrade pip sudo apt-get install gettext @@ -41,8 +42,6 @@ jobs: pip --version pip debug - python -m pip install --upgrade pip - # wxPython doen't publish linux wheels in pypi wget -q https://extras.wxpython.org/wxPython4/extras/linux/gtk3/ubuntu-16.04/wxPython-4.0.6-cp27-cp27mu-linux_x86_64.whl python -m pip install wxPython*.whl -- cgit v1.2.3 From 8af7db5789734f2251653eea2249acdbd8913a15 Mon Sep 17 00:00:00 2001 From: Lex Neva Date: Mon, 27 Jan 2020 15:31:26 -0500 Subject: uncompress myself? --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index cd4af0dd..2b45ee70 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -93,7 +93,7 @@ jobs: pip install pyinstaller==3.3.1 echo "before tar" - tar -vjxf inkscape-0.92.3.tar.bz2 + bzcat inkscape-0.92.3.tar.bz2 | tar -vxf - echo "after tar" rm inkscape-0.92.3.tar.bz2 mv inkscape-0.92.3 inkscape -- cgit v1.2.3 From 8614760b743b4bde1e2e148c66c424214c5d1809 Mon Sep 17 00:00:00 2001 From: Lex Neva Date: Mon, 27 Jan 2020 15:39:45 -0500 Subject: use python -m for pyinstaller --- .github/workflows/build.yml | 4 ++-- bin/build-python | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 2b45ee70..a49454d1 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -39,8 +39,8 @@ jobs: uname -a python --version - pip --version - pip debug + python -m pip --version + python -m pip debug # wxPython doen't publish linux wheels in pypi wget -q https://extras.wxpython.org/wxPython4/extras/linux/gtk3/ubuntu-16.04/wxPython-4.0.6-cp27-cp27mu-linux_x86_64.whl diff --git a/bin/build-python b/bin/build-python index 7326e371..bbd2af87 100755 --- a/bin/build-python +++ b/bin/build-python @@ -35,11 +35,11 @@ pyinstaller_args+="-p inkscape/share/extensions " pyinstaller_args+="--log-level DEBUG " if [ "$BUILD" = "windows" ]; then - pyinstaller $pyinstaller_args inkstitch.py + python -m PyInstaller $pyinstaller_args inkstitch.py else # without the LD_LIBRARY_PATH, it seems that pyinstaller can't find all of # wxpython's shared libraries - LD_LIBRARY_PATH="${site_packages}/wx" pyinstaller $pyinstaller_args --strip inkstitch.py; + LD_LIBRARY_PATH="${site_packages}/wx" python -m PyInstaller $pyinstaller_args --strip inkstitch.py; fi # pyinstaller put a whole mess of libraries under dist/inkstitch. We'd like -- cgit v1.2.3 From 25e9ea608d7d1173cfe6ce631f7fa116f5ad2c4d Mon Sep 17 00:00:00 2001 From: Lex Neva Date: Mon, 27 Jan 2020 15:42:09 -0500 Subject: tidy --- .github/workflows/build.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index a49454d1..95676d90 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -91,10 +91,9 @@ jobs: pip install Shapely-1.6.3-cp27-cp27m-win32.whl pip install -r requirements.txt pip install pyinstaller==3.3.1 - - echo "before tar" + + # Just using tar -j freezes forever with no output. Heck if I know why. This seems to work. bzcat inkscape-0.92.3.tar.bz2 | tar -vxf - - echo "after tar" rm inkscape-0.92.3.tar.bz2 mv inkscape-0.92.3 inkscape -- cgit v1.2.3 From 6573b167958ff1de882466acc455d2dfed767fe1 Mon Sep 17 00:00:00 2001 From: Lex Neva Date: Mon, 27 Jan 2020 22:22:22 -0500 Subject: remove obselete TRAVIS_ references --- bin/build-distribution-archives | 5 ++--- bin/build-python | 6 +++--- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/bin/build-distribution-archives b/bin/build-distribution-archives index 4aa83edf..0fcadb59 100755 --- a/bin/build-distribution-archives +++ b/bin/build-distribution-archives @@ -1,8 +1,7 @@ #!/bin/bash -# TRAVIS_BRANCH is the branch name or the name of the tag. -VERSION="$(echo ${TRAVIS_BRANCH:-${GITHUB_REF}} | tr / -)" -OS="${TRAVIS_OS_NAME:-${BUILD:-$(uname)}}" +VERSION="$(echo ${GITHUB_REF} | tr / -)" +OS="${BUILD:-$(uname)}" ARCH="$(uname -m)" cp -a images/examples palettes symbols fonts dist/inkstitch diff --git a/bin/build-python b/bin/build-python index bbd2af87..69058593 100755 --- a/bin/build-python +++ b/bin/build-python @@ -4,7 +4,7 @@ set -e site_packages="$(python -c "import os; print(os.path.dirname(os.__file__) + '/site-packages')")" -if [ "$TRAVIS_OS_NAME" = "linux" -a "$BUILD" != "windows" ]; then +if [ "$BUILD" = "linux" ]; then # pyinstaller misses these two pyinstaller_args+="--add-binary /usr/lib/x86_64-linux-gnu/gio/modules/libgiolibproxy.so:. " pyinstaller_args+="--add-binary /usr/lib/x86_64-linux-gnu/libproxy.so.1:. " @@ -24,7 +24,7 @@ pyinstaller_args+="--hidden-import wx " # We need to use the precompiled bootloader linked with graphical Mac OS X # libraries if we develop a GUI application for Mac: -if [ "$TRAVIS_OS_NAME" = "osx" ]; then +if [ "$BUILD" = "osx" ]; then pyinstaller_args+="--windowed " fi @@ -52,7 +52,7 @@ mv dist/inkstitch/* dist/bin mv dist/bin dist/inkstitch # on Mac, pyinstaller creates a .app version as well, but we don't need that -if [ "$TRAVIS_OS_NAME" = "osx" ]; then +if [ "$BUILD" = "osx" ]; then rm -rf dist/inkstitch.app/ fi -- cgit v1.2.3 From 6c81429111727cb6bccfa29354396c7782b65e2b Mon Sep 17 00:00:00 2001 From: Lex Neva Date: Thu, 30 Jan 2020 23:57:17 -0500 Subject: fix fonts on windows --- bin/build-distribution-archives | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/bin/build-distribution-archives b/bin/build-distribution-archives index 0fcadb59..825db510 100755 --- a/bin/build-distribution-archives +++ b/bin/build-distribution-archives @@ -17,10 +17,16 @@ mkdir artifacts for d in inx/*; do lang=${d%.*} - lang=${lang#*/} + lang=${lang#*/} cp $d/*.inx dist cd dist - python -m zipfile -c ../artifacts/inkstitch-${VERSION}-${OS}-${lang}.zip * - cd .. + if [ "$BUILD" = "windows" ]; then + # The python zipfile command line utility can't handle directories + # containing files with UTF-8 names on Windows, so we use 7-zip instead. + 7z a ../artifacts/inkstitch-${VERSION}-${OS}-${lang}.zip * + else + python -m zipfile -c ../artifacts/inkstitch-${VERSION}-${OS}-${lang}.zip * + fi + cd .. done -- cgit v1.2.3 From ebf59c626e76d3456fd55b2befba94df02bbf1bb Mon Sep 17 00:00:00 2001 From: Lex Neva Date: Fri, 31 Jan 2020 01:18:24 -0500 Subject: pin to shapely 1.6.3 for pyinstaller compatibility --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 5ab6f5fb..0c3782a2 100644 --- a/requirements.txt +++ b/requirements.txt @@ -2,7 +2,7 @@ backports.functools_lru_cache wxPython==4.0.6 networkx==2.2 -shapely +shapely==1.6.3 lxml appdirs numpy<1.16.0 -- cgit v1.2.3 From ff6740e4011c6f9b6d1256635c6f5fa24c8a97b9 Mon Sep 17 00:00:00 2001 From: Lex Neva Date: Fri, 31 Jan 2020 01:46:20 -0500 Subject: fix linux version with shapely 1.7.0 --- .github/workflows/build.yml | 5 ----- requirements.txt | 2 +- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 95676d90..dd30cf9e 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -46,11 +46,6 @@ jobs: wget -q https://extras.wxpython.org/wxPython4/extras/linux/gtk3/ubuntu-16.04/wxPython-4.0.6-cp27-cp27mu-linux_x86_64.whl python -m pip install wxPython*.whl - # We can't use the shapely wheel because it includes the geos - # library but with a weird file name. Details: - # https://github.com/pyinstaller/pyinstaller/blob/61b1c75c2b0469b32d114298a63bf60b8d597e37/PyInstaller/hooks/hook-shapely.py#L34 - python -m pip install --no-binary shapely -r requirements.txt - python -m pip install PyGObject python -m pip install -r requirements.txt diff --git a/requirements.txt b/requirements.txt index 0c3782a2..5ab6f5fb 100644 --- a/requirements.txt +++ b/requirements.txt @@ -2,7 +2,7 @@ backports.functools_lru_cache wxPython==4.0.6 networkx==2.2 -shapely==1.6.3 +shapely lxml appdirs numpy<1.16.0 -- cgit v1.2.3 From 3c32246568af85871717a0f3e7d132f9f1a0ea3e Mon Sep 17 00:00:00 2001 From: Lex Neva Date: Fri, 31 Jan 2020 02:03:20 -0500 Subject: no longer need libgeos-dev --- .github/workflows/build.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index dd30cf9e..ae16fade 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -28,9 +28,6 @@ jobs: sudo apt-get install gettext - # for shapely - sudo apt-get install libgeos-dev - # for wxPython sudo apt-get install glib-networking libsdl1.2-dev -- cgit v1.2.3