From 674e18fdab8d66b6de4bfd6d526e19000099b8c8 Mon Sep 17 00:00:00 2001 From: Joel Beckmeyer Date: Mon, 28 Feb 2022 18:49:33 -0500 Subject: [PATCH 1/5] New package: python3-Flask-Cors-3.0.10 --- srcpkgs/python3-Flask-Cors/template | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 srcpkgs/python3-Flask-Cors/template diff --git a/srcpkgs/python3-Flask-Cors/template b/srcpkgs/python3-Flask-Cors/template new file mode 100644 index 00000000000000..7af4ebc13473b6 --- /dev/null +++ b/srcpkgs/python3-Flask-Cors/template @@ -0,0 +1,20 @@ +# Template file for 'python3-Flask-Cors' +pkgname=python3-Flask-Cors +version=3.0.10 +revision=1 +wrksrc="${pkgname#*-}-${version}" +build_style=python3-module +hostmakedepends="python3-setuptools" +depends="python3-Flask python3-six" +checkdepends="python3-pytest ${depends}" +short_desc="Flask extension adding a decorator for CORS support" +maintainer="Joel Beckmeyer " +license="MIT" +homepage="https://github.com/corydolphin/flask-cors" +changelog="https://raw.githubusercontent.com/corydolphin/flask-cors/master/CHANGELOG.md" +distfiles="${PYPI_SITE}/F/Flask-Cors/Flask-Cors-${version}.tar.gz" +checksum=b60839393f3b84a0f3746f6cdca56c1ad7426aa738b70d6c61375857823181de + +post_install() { + vlicense LICENSE +} From 6ee1d93922cc7084a697911909cfac9b0f0ab7e7 Mon Sep 17 00:00:00 2001 From: Joel Beckmeyer Date: Mon, 28 Feb 2022 18:57:24 -0500 Subject: [PATCH 2/5] New package: python3-pymediainfo-5.1.0 --- srcpkgs/python3-pymediainfo/template | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 srcpkgs/python3-pymediainfo/template diff --git a/srcpkgs/python3-pymediainfo/template b/srcpkgs/python3-pymediainfo/template new file mode 100644 index 00000000000000..745c82cb37ce5c --- /dev/null +++ b/srcpkgs/python3-pymediainfo/template @@ -0,0 +1,19 @@ +# Template file for 'python3-pymediainfo' +pkgname=python3-pymediainfo +version=5.1.0 +revision=1 +wrksrc="pymediainfo-${version}" +build_style=python3-module +hostmakedepends="python3-setuptools_scm" +depends="python3-importlib_metadata libmediainfo" +checkdepends="python3-pytest libmediainfo" +short_desc="Python wrapper around the MediaInfo library" +maintainer="Joel Beckmeyer " +license="MIT" +homepage="https://github.com/sbraz/pymediainfo" +distfiles="${PYPI_SITE}/p/pymediainfo/pymediainfo-${version}.tar.gz" +checksum=d996c69d50081a24d6dca9679abf43ffd2be368b065f953c2c9082e5d649c734 + +post_install() { + vlicense LICENSE +} From 1a4ebab180d6733a5b858afda25c45de3e3bc04c Mon Sep 17 00:00:00 2001 From: Joel Beckmeyer Date: Mon, 28 Feb 2022 19:06:04 -0500 Subject: [PATCH 3/5] New package: python3-vlc-3.0.16120 --- srcpkgs/python3-vlc/template | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 srcpkgs/python3-vlc/template diff --git a/srcpkgs/python3-vlc/template b/srcpkgs/python3-vlc/template new file mode 100644 index 00000000000000..2c1357c2695410 --- /dev/null +++ b/srcpkgs/python3-vlc/template @@ -0,0 +1,14 @@ +# Template file for 'python3-vlc' +pkgname=python3-vlc +version=3.0.16120 +revision=1 +wrksrc="python-vlc-${version}" +build_style=python3-module +hostmakedepends="python3-setuptools" +depends="python3" +short_desc="VLC bindings for python" +maintainer="Joel Beckmeyer " +license="LGPL-2.1-or-later" +homepage="https://wiki.videolan.org/Python_bindings" +distfiles="${PYPI_SITE}/p/python-vlc/python-vlc-${version}.tar.gz" +checksum=92f98fee088f72bd6d063b3b3312d0bd29b37e7ad65ddeb3a7303320300c2807 From 232214f96150a2a21e34361e2641c0e30e9726e7 Mon Sep 17 00:00:00 2001 From: Joel Beckmeyer Date: Mon, 28 Feb 2022 19:14:54 -0500 Subject: [PATCH 4/5] New package: python3-QtAwesome-1.1.1 --- srcpkgs/python3-QtAwesome/template | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 srcpkgs/python3-QtAwesome/template diff --git a/srcpkgs/python3-QtAwesome/template b/srcpkgs/python3-QtAwesome/template new file mode 100644 index 00000000000000..cd84ff6f74daed --- /dev/null +++ b/srcpkgs/python3-QtAwesome/template @@ -0,0 +1,20 @@ +# Template file for 'python3-QtAwesome' +pkgname=python3-QtAwesome +version=1.1.1 +revision=1 +wrksrc="QtAwesome-${version}" +build_style=python3-module +hostmakedepends="python3-setuptools" +depends="python3-QtPy" +checkdepends="python3-pytest-qt python3-PyQt5 ${depends}" +short_desc="Iconic fonts in PyQt and PySide applications" +maintainer="Joel Beckmeyer " +license="MIT" +homepage="https://github.com/spyder-ide/qtawesome" +changelog="https://raw.githubusercontent.com/spyder-ide/qtawesome/master/CHANGELOG.md" +distfiles="${PYPI_SITE}/Q/QtAwesome/QtAwesome-${version}.tar.gz" +checksum=ec02e200231fa68a146a93845890aa0432a7edcba14bf811ff6975cf9acdab5d + +post_install() { + vlicense LICENSE.txt +} From db7213d8987af7956bbbbbd5cf7a8260a9b33e38 Mon Sep 17 00:00:00 2001 From: Joel Beckmeyer Date: Mon, 28 Feb 2022 18:41:59 -0500 Subject: [PATCH 5/5] OpenLP: update to 2.9.4. --- srcpkgs/OpenLP/patches/no_pytest_runner.patch | 11 +++ .../OpenLP/patches/py310_applocation.patch | 67 +++++++++++++++++++ srcpkgs/OpenLP/template | 33 +++++---- 3 files changed, 99 insertions(+), 12 deletions(-) create mode 100644 srcpkgs/OpenLP/patches/no_pytest_runner.patch create mode 100644 srcpkgs/OpenLP/patches/py310_applocation.patch diff --git a/srcpkgs/OpenLP/patches/no_pytest_runner.patch b/srcpkgs/OpenLP/patches/no_pytest_runner.patch new file mode 100644 index 00000000000000..e829c59dad61d9 --- /dev/null +++ b/srcpkgs/OpenLP/patches/no_pytest_runner.patch @@ -0,0 +1,11 @@ +diff --git a/setup.py b/setup.py +index 1476585..4fc3ab0 100644 +--- a/setup.py ++++ b/setup.py +@@ -141,6 +141,5 @@ using a computer and a data projector.""", + 'flake8', + ] + }, +- setup_requires=['pytest-runner'], + entry_points={'gui_scripts': ['openlp = openlp.__main__:start']} + ) diff --git a/srcpkgs/OpenLP/patches/py310_applocation.patch b/srcpkgs/OpenLP/patches/py310_applocation.patch new file mode 100644 index 00000000000000..89dc3e8c8a844c --- /dev/null +++ b/srcpkgs/OpenLP/patches/py310_applocation.patch @@ -0,0 +1,67 @@ +From 54ad75426825cdd977f770b12a62ee92218b82d6 Mon Sep 17 00:00:00 2001 +From: Raoul Snyman +Date: Thu, 3 Feb 2022 11:26:24 -0700 +Subject: [PATCH] Make two versions of a test to work around a difference in + Python 3.10 + +--- + tests/openlp_core/common/test_applocation.py | 29 +++++++++++++++++++- + 1 file changed, 28 insertions(+), 1 deletion(-) + +diff --git a/tests/openlp_core/common/test_applocation.py b/tests/openlp_core/common/test_applocation.py +index 2aebc5213..432773ec7 100644 +--- a/tests/openlp_core/common/test_applocation.py ++++ b/tests/openlp_core/common/test_applocation.py +@@ -22,9 +22,12 @@ + Functional tests to test the AppLocation class and related methods. + """ + import os ++import sys + from pathlib import Path + from unittest.mock import patch + ++import pytest ++ + from openlp.core.common import get_frozen_path + from openlp.core.common.applocation import AppLocation + +@@ -141,11 +144,35 @@ def test_get_directory_for_app_dir(mocked_get_frozen_path): + assert directory == Path.cwd() / Path('app', 'dir'), 'Directory should be "app/dir"' + + ++@pytest.mark.skipif(sys.version_info < (3, 10), reason="Python 3.10 version of this test") ++@patch('openlp.core.common.applocation.get_frozen_path') ++@patch('openlp.core.common.applocation.os.path.abspath') ++@patch('openlp.core.common.applocation.os.path.split') ++@patch('openlp.core.common.applocation.sys') ++def test_get_directory_for_plugins_dir_py310(mocked_sys, mocked_split, mocked_abspath, mocked_get_frozen_path): ++ """ ++ Test the AppLocation.get_directory() method for AppLocation.PluginsDir ++ """ ++ # GIVEN: _get_frozen_path, abspath, split and sys are mocked out ++ mocked_abspath.return_value = os.path.join('dir', 'plugins') ++ mocked_split.return_value = ['openlp'] ++ mocked_get_frozen_path.return_value = Path('dir') ++ mocked_sys.frozen = 1 ++ mocked_sys.argv = ['openlp'] ++ ++ # WHEN: We call AppLocation.get_directory ++ directory = AppLocation.get_directory(AppLocation.PluginsDir) ++ ++ # THEN: The correct directory should be returned ++ assert directory == Path('dir', 'plugins'), 'Directory should be "dir/plugins"' ++ ++ ++@pytest.mark.skipif(sys.version_info >= (3, 10), reason="Python 3.9 version of this test") + @patch('openlp.core.common.applocation.get_frozen_path') + @patch('openlp.core.common.applocation.os.path.abspath') + @patch('openlp.core.common.applocation.os.path.split') + @patch('openlp.core.common.applocation.sys') +-def test_get_directory_for_plugins_dir(mocked_sys, mocked_split, mocked_abspath, mocked_get_frozen_path): ++def test_get_directory_for_plugins_dir_py39(mocked_sys, mocked_split, mocked_abspath, mocked_get_frozen_path): + """ + Test the AppLocation.get_directory() method for AppLocation.PluginsDir + """ +-- +GitLab + diff --git a/srcpkgs/OpenLP/template b/srcpkgs/OpenLP/template index 64f86854a286a2..023ffdbc38dfc1 100644 --- a/srcpkgs/OpenLP/template +++ b/srcpkgs/OpenLP/template @@ -1,26 +1,35 @@ # Template file for 'OpenLP' pkgname=OpenLP -version=2.4.6 -revision=5 +version=2.9.4 +revision=1 +wrksrc="OpenLP-${version}" +create_wrksrc=yes build_style=python3-module +# test always fails with AssertionError +# see https://gitlab.com/openlp/openlp/-/issues/1024 +make_check_args="--deselect tests/openlp_core/ui/test_mainwindow.py::test_load_settings_position_invalid" hostmakedepends="python3-setuptools qt5-host-tools" -depends="python3-BeautifulSoup4 python3-PyQt5-multimedia python3-PyQt5-opengl - python3-PyQt5-webkit python3-SQLAlchemy python3-alembic python3-chardet - python3-lxml" +depends="python3-alembic python3-appdirs python3-BeautifulSoup4 python3-chardet + python3-dbus python3-distro python3-Flask python3-Flask-Cors python3-lxml + python3-Mako python3-Pillow python3-pymediainfo python3-PyQt5 + python3-PyQt5-multimedia python3-PyQt5-webengine python3-vlc python3-qrcode + python3-QtAwesome python3-requests python3-SQLAlchemy python3-waitress + python3-WebOb python3-websockets python3-zeroconf" +checkdepends="python3-pytest-qt ${depends}" short_desc="Free Worship Presentation Software for your Church" maintainer="Piotr Wójcik " -license="GPL-2.0-only" +license="GPL-3.0-or-later" homepage="https://openlp.org/" distfiles="https://get.openlp.org/${version}/OpenLP-${version}.tar.gz" -checksum=f63dcf5f1f8a8199bf55e806b44066ad920d26c9cf67ae432eb8cdd1e761fc30 +checksum=24dcd14841b5a6a03e0ac12202628429f467264ac8605268c63b6634121dd73a -do_check() { - : # nosetests -v tests segfaults -} +if [ "$XBPS_TARGET_LIBC" = "musl" ]; then + # test fails with XMLSyntaxError + # see https://gitlab.com/openlp/openlp/-/issues/1023 + make_check_args+=" --deselect tests/openlp_plugins/songs/test_presentationmanagerimport.py::test_presenter_manager" +fi post_install() { - rm -r ${DESTDIR}/usr/lib/python*/site-packages/tests - mv ${DESTDIR}/usr/bin/openlp.py ${DESTDIR}/usr/bin/openlp vinstall resources/openlp.desktop 644 usr/share/applications vmkdir usr/share/openlp/i18n cd resources/i18n