From c74010e1c1213ec0864e3a7f3717e5d13fd2ef10 Mon Sep 17 00:00:00 2001 From: Benoit Pierre Date: Sun, 11 Nov 2018 14:11:42 +0100 Subject: [PATCH 01/11] setup: drop `setup_requires` Not needed now that PEP 518 is used. --- setup.cfg | 3 --- 1 file changed, 3 deletions(-) diff --git a/setup.cfg b/setup.cfg index c78c94fb6..4dd3e0f1d 100644 --- a/setup.cfg +++ b/setup.cfg @@ -27,9 +27,6 @@ keywords = plover include_package_data = True python_requires = >=3.4 zip_safe = True -setup_requires = - Babel - PyQt5>=5.8.2 tests_require = pytest install_requires = From 1de5ee4c69b428740196679039b71947e1d58d9c Mon Sep 17 00:00:00 2001 From: Benoit Pierre Date: Sun, 11 Nov 2018 17:02:51 +0100 Subject: [PATCH 02/11] windows: switch to building a 64bits version Necessary so it's possible to update to the latest PyQt5 version (without loosing support for QtWebEngine). --- appveyor.yml | 4 ++-- setup.py | 6 +++--- windows/helper.py | 9 +++++---- 3 files changed, 10 insertions(+), 9 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index 69e41e0e8..4a1c814e2 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -23,9 +23,9 @@ environment: matrix: - - PYTHON: "C:\\Python36" + - PYTHON: "C:\\Python36-x64" PYTHON_VERSION: "3.6" - PYTHON_ARCH: "32" + PYTHON_ARCH: "64" cache: - .cache diff --git a/setup.py b/setup.py index 69a801928..6578f81a7 100755 --- a/setup.py +++ b/setup.py @@ -95,9 +95,9 @@ def run(self): # Setup embedded Python distribution. # Note: python36.zip is decompressed to prevent errors when 2to3 # is used (including indirectly by setuptools `build_py` command). - py_embedded = download('https://www.python.org/ftp/python/3.6.3/python-3.6.3-embed-win32.zip', - '3769c2129779b43f2dade3b89c783d957bff1461') - dist_dir = os.path.join(wheel_cmd.dist_dir, PACKAGE + '-win32') + py_embedded = download('https://www.python.org/ftp/python/3.6.7/python-3.6.7-embed-amd64.zip', + '7a81435a25d9557581393ea6805dafb662eaf9e2') + dist_dir = os.path.join(wheel_cmd.dist_dir, PACKAGE + '-win64') dist_data = os.path.join(dist_dir, 'data') dist_py = os.path.join(dist_data, 'python.exe') dist_stdlib = os.path.join(dist_data, 'python36.zip') diff --git a/windows/helper.py b/windows/helper.py index 117c0c053..a698ad07d 100755 --- a/windows/helper.py +++ b/windows/helper.py @@ -120,9 +120,10 @@ def __init__(self, prefix): super().__init__() self._prefix = os.path.abspath(prefix) self._env['WINEPREFIX'] = self._prefix - self._env['WINEARCH'] = 'win32' + self._env['WINEARCH'] = 'win64' self._env['WINEDEBUG'] = '-all' self._env['WINETRICKS_OPT_SHAREDPREFIX'] = '1' + self._env['WINEDLLOVERRIDES'] = 'api-ms-win-core-path-l1-1-0=d' def setup(self): if not os.path.exists(self._prefix): @@ -131,7 +132,7 @@ def setup(self): 'env DISPLAY= wineboot --init', # Wait for previous command to finish. 'wineserver -w', - 'winetricks --no-isolate --unattended corefonts vcrun2008', + 'winetricks --no-isolate --unattended corefonts', 'winetricks win7', ): self.run(cmd.split()) @@ -542,8 +543,8 @@ def main(self, args): class WineHelper(Helper): DEPENDENCIES = ( - ('Python', 'https://www.python.org/ftp/python/3.6.2/python-3.6.2.exe', - 'cd9744b142eca832f9534390676e6cfb84bf655d', None, ('PrependPath=1', '/S'), None), + ('Python', 'https://www.python.org/ftp/python/3.6.7/python-3.6.7-amd64.exe', + '4f3bd61c16ef2fbec38bd7ed53f8f4b4f2896c90', None, ('PrependPath=1', '/S'), None), ) + Helper.DEPENDENCIES def __init__(self): From 9bbd7697ffd69f2e3d740d9b5237d918b9e0cdb4 Mon Sep 17 00:00:00 2001 From: Benoit Pierre Date: Sun, 11 Nov 2018 16:12:40 +0100 Subject: [PATCH 03/11] setup: fix `bdist_app` command Support newer versions of the wheel package. --- osx/make_app.sh | 2 +- setup.py | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/osx/make_app.sh b/osx/make_app.sh index a3be8928f..1b741f88a 100644 --- a/osx/make_app.sh +++ b/osx/make_app.sh @@ -10,7 +10,7 @@ set -e python='python3' osx_dir="$(dirname "$0")" plover_dir="$(dirname "$osx_dir")" -plover_wheel="$plover_dir/dist/$1.whl" +plover_wheel="$1" PACKAGE="$2" echo "Making Plover.app with Plover wheel $plover_wheel" diff --git a/setup.py b/setup.py index 6578f81a7..f8937a071 100755 --- a/setup.py +++ b/setup.py @@ -310,7 +310,12 @@ def finalize_options(self): def run(self): whl_cmd = self.get_finalized_command('bdist_wheel') whl_cmd.run() - wheel_path = whl_cmd.get_archive_basename() + for cmd, py_version, dist_path in whl_cmd.distribution.dist_files: + if cmd == 'bdist_wheel': + wheel_path = dist_path + break + else: + raise Exception('could not find wheel path') cmd = 'bash osx/make_app.sh %s %s' % (wheel_path, PACKAGE) log.info('running %s', cmd) subprocess.check_call(cmd.split()) From 265693eb32f3bff36d5def47c744c90cbe3e2a71 Mon Sep 17 00:00:00 2001 From: Benoit Pierre Date: Sun, 11 Nov 2018 15:51:08 +0100 Subject: [PATCH 04/11] travis: improve packaging sanity checks --- ci/travis.sh | 6 +++--- requirements.txt | 3 ++- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/ci/travis.sh b/ci/travis.sh index 3099bef91..695419ecd 100755 --- a/ci/travis.sh +++ b/ci/travis.sh @@ -74,15 +74,15 @@ build() run "$python" setup.py test # Run some packaging related sanity checks. run "$python" -m check_manifest - run "$python" setup.py check -m -r -s + run "$python" setup.py check -m -s + run "$python" setup.py bdist_wheel sdist + run "$python" -m twine check dist/* # Only generate artifacts if we're actually going to deploy them. # Note: if we moved this to the `before_deploy` phase, we would # not have to check, but we'd also lose caching; since the cache # is stored before the `before_install` phase... if is_deployment then - # Create wheel and source distribution. - run "$python" setup.py bdist_wheel sdist # Build AppImage. run ./linux/appimage/build.sh -c -j 2 -w dist/*.whl run rm -rf .cache/pip diff --git a/requirements.txt b/requirements.txt index 480c26666..888f4e5bf 100644 --- a/requirements.txt +++ b/requirements.txt @@ -2,11 +2,12 @@ Babel==2.4.0 check-manifest==0.35 Cython==0.28.5 https://github.com/benoit-pierre/dmgbuild/archive/plover.zip; "darwin" in sys_platform -docutils==0.14 macholib==1.8; "darwin" in sys_platform pip==9.0.1 pytest==3.1.3 +readme-renderer[md]==24.0 setuptools-scm==1.15.5 +twine==1.12.1 wheel==0.30.0 -r requirements_distribution.txt From ba0a618d09d14b24c6f412ecc07cdb41520ad8ce Mon Sep 17 00:00:00 2001 From: Benoit Pierre Date: Sun, 11 Nov 2018 17:46:59 +0100 Subject: [PATCH 05/11] osx: update to latest Python 3.6 release --- ci/circle.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/circle.sh b/ci/circle.sh index f722b6f39..ff961e57e 100755 --- a/ci/circle.sh +++ b/ci/circle.sh @@ -38,7 +38,7 @@ setup() { mkdir -p "$CIRCLE_ARTIFACTS" # Install Python. - download 'python36.pkg' 'https://www.python.org/ftp/python/3.6.2/python-3.6.2-macosx10.6.pkg' '86e6193fd56b1e757fc8a5a2bb6c52ba' + download 'python36.pkg' 'https://www.python.org/ftp/python/3.6.7/python-3.6.7-macosx10.6.pkg' '68885dffc1d13c5d24699daa0b83315f' run sudo installer -pkg "$downloads/python36.pkg" -target / # Update certifiates. run '/Applications/Python 3.6/Install Certificates.command' From 350f532c8a619c3e35b98538370f0745a0fd96b4 Mon Sep 17 00:00:00 2001 From: Benoit Pierre Date: Sun, 11 Nov 2018 17:56:01 +0100 Subject: [PATCH 06/11] linux/appimage: update Python version to 3.6.7 --- linux/appimage/build.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/linux/appimage/build.sh b/linux/appimage/build.sh index a41645fa8..8cd44c7f3 100755 --- a/linux/appimage/build.sh +++ b/linux/appimage/build.sh @@ -54,7 +54,7 @@ run mkdir -p "$appdir" "$cachedir" "$distdir" # Download dependencies. run "$python" -m plover_build_utils.download 'https://github.com/probonopd/AppImages/raw/f748bb63999e655cfbb70e88ec27e74e2b9bf8fd/functions.sh' 'a99457e22d24a61f42931b2aaafd41f2746af820' "$cachedir/functions.sh" run "$python" -m plover_build_utils.download 'https://github.com/probonopd/AppImageKit/releases/download/9/appimagetool-x86_64.AppImage' 'ba71c5a03398b81eaa678207da1338c83189db89' "$cachedir/appimagetool" -run "$python" -m plover_build_utils.download 'https://www.python.org/ftp/python/3.6.2/Python-3.6.2.tar.xz' '4f92a045de9231b93dfbed50c66bb12cf03ac59a' +run "$python" -m plover_build_utils.download 'https://www.python.org/ftp/python/3.6.7/Python-3.6.7.tar.xz' 'dd2b0a8bf9b9617c57a0070b53065286c2142994' # Generate Plover wheel. if [ -z "$wheel" ] @@ -69,10 +69,10 @@ then fi # Build Python. -run tar xf "$downloads/Python-3.6.2.tar.xz" -C "$builddir" +run tar xf "$downloads/Python-3.6.7.tar.xz" -C "$builddir" info '(' ( -run cd "$builddir/Python-3.6.2" +run cd "$builddir/Python-3.6.7" cmd=( ./configure --cache-file="$cachedir/python.config.cache" From 0c7efa2aa35dc5d08039ec3bda4d5c060ba152c1 Mon Sep 17 00:00:00 2001 From: Benoit Pierre Date: Sun, 11 Nov 2018 18:00:11 +0100 Subject: [PATCH 07/11] update distribution requirements --- requirements_distribution.txt | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/requirements_distribution.txt b/requirements_distribution.txt index 3f7de21eb..c9e1b5be0 100644 --- a/requirements_distribution.txt +++ b/requirements_distribution.txt @@ -1,16 +1,17 @@ appdirs==1.4.3 appnope==0.1.0; "darwin" in sys_platform -certifi==2018.1.18 +certifi==2018.10.15 dbus-python==1.2.4; "linux" in sys_platform plyer==1.2.4; "win32" in sys_platform -pyobjc-core==4.0; "darwin" in sys_platform -pyobjc-framework-Cocoa==4.0; "darwin" in sys_platform -pyobjc-framework-Quartz==4.0; "darwin" in sys_platform -PyQt5==5.9.2 +pyobjc-core==5.1.1; "darwin" in sys_platform +pyobjc-framework-Cocoa==5.1.1; "darwin" in sys_platform +pyobjc-framework-Quartz==5.1.1; "darwin" in sys_platform +PyQt5-sip==4.19.13 +PyQt5==5.11.3 pyserial==3.4 python-xlib==0.23; "linux" in sys_platform -setuptools==38.2.4 -six==1.10.0 +setuptools==40.5.0 +six==1.11.0 wcwidth==0.1.7 # vim: ft=cfg commentstring=#\ %s list From 6d37d9961e028981490f281bafb456a071762cb2 Mon Sep 17 00:00:00 2001 From: Benoit Pierre Date: Sun, 11 Nov 2018 18:01:32 +0100 Subject: [PATCH 08/11] plugins: update plover-plugins-manager to latest version --- requirements_plugins.txt | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/requirements_plugins.txt b/requirements_plugins.txt index a2c284d04..223efb8b0 100644 --- a/requirements_plugins.txt +++ b/requirements_plugins.txt @@ -1,9 +1,15 @@ # plover-plugins-manager +bleach==3.0.2 +cffi==1.11.5 +cmarkgfm==0.4.2 docutils==0.14 -pip==9.0.1 -plover-plugins-manager==0.5.11 +pip==18.1 +plover-plugins-manager==0.5.13 +pycparser==2.19 Pygments==2.2.0 -wheel==0.30.0 +readme-renderer==24.0 +webencodings==0.5.1 +wheel==0.32.2 # plover-treal hidapi==0.7.99.post21 plover-treal==1.0.1 From 84fa0ad94457676e4052aad4ef22e75909d825b7 Mon Sep 17 00:00:00 2001 From: Benoit Pierre Date: Sun, 11 Nov 2018 18:02:16 +0100 Subject: [PATCH 09/11] update development requirements --- requirements.txt | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/requirements.txt b/requirements.txt index 888f4e5bf..26f348969 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,14 +1,14 @@ -Babel==2.4.0 -check-manifest==0.35 -Cython==0.28.5 +Babel==2.6.0 +check-manifest==0.37 +Cython==0.29 https://github.com/benoit-pierre/dmgbuild/archive/plover.zip; "darwin" in sys_platform -macholib==1.8; "darwin" in sys_platform -pip==9.0.1 -pytest==3.1.3 +macholib==1.11; "darwin" in sys_platform +pip==18.1 +pytest==3.10.0 readme-renderer[md]==24.0 -setuptools-scm==1.15.5 +setuptools-scm==3.1.0 twine==1.12.1 -wheel==0.30.0 +wheel==0.32.2 -r requirements_distribution.txt # vim: ft=cfg commentstring=#\ %s list From c6a7c675c8e86f56905f783f24cbf2c61e3aefe9 Mon Sep 17 00:00:00 2001 From: Benoit Pierre Date: Sun, 11 Nov 2018 20:32:14 +0100 Subject: [PATCH 10/11] tests: fix pytest warnings --- test/test_rtfcre_dict.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/test_rtfcre_dict.py b/test/test_rtfcre_dict.py index 1a65ba9fa..bcee814dd 100644 --- a/test/test_rtfcre_dict.py +++ b/test/test_rtfcre_dict.py @@ -29,11 +29,11 @@ ''', # One translation on multiple lines. - lambda: pytest.mark.xfail(''' + lambda: pytest.param(''' {\\*\\cxs SP}\r\ntranslation 'SP': 'translation' - '''), + ''', marks=pytest.mark.xfail), # Multiple translations no newlines. lambda: r''' @@ -133,7 +133,7 @@ lambda: ('', ''), lambda: (r'\-', '-'), lambda: (r'\\ ', '\\ '), - lambda: pytest.mark.xfail((r'\\', '\\')), + lambda: pytest.param((r'\\', '\\'), marks=pytest.mark.xfail), lambda: (r'\{', '{'), lambda: (r'\}', '}'), lambda: (r'\~', '{^ ^}'), From f166d85986bd1d54dcad34ef03f4ce352b1b692d Mon Sep 17 00:00:00 2001 From: Benoit Pierre Date: Sun, 18 Nov 2018 11:56:30 +0100 Subject: [PATCH 11/11] osx/app: fix distribution --- osx/app_resources/dist_blacklist.txt | 1 - 1 file changed, 1 deletion(-) diff --git a/osx/app_resources/dist_blacklist.txt b/osx/app_resources/dist_blacklist.txt index 7764f68de..9659915a5 100644 --- a/osx/app_resources/dist_blacklist.txt +++ b/osx/app_resources/dist_blacklist.txt @@ -19,7 +19,6 @@ **/*AxContainer* **/*Bluetooth* **/*CLucene* - **/*DBus* **/*Designer* **/*Location* **/*Nfc*