diff options
author | axionl | 2018-08-29 21:38:57 +0800 |
---|---|---|
committer | axionl | 2018-08-29 21:38:57 +0800 |
commit | ac467450f6c09497f45806712de635f9e1bbb829 (patch) | |
tree | c8c751b5b1bcd437f441c969deca5e2e50247cc7 | |
parent | d1a1dd58d6b8144ed5f992cda91feb3eac5711d8 (diff) | |
download | aur-ac467450f6c09497f45806712de635f9e1bbb829.tar.gz |
[Update] netease-musicbox-git: remove python2 version and some depends.
-rw-r--r-- | .SRCINFO | 58 | ||||
-rw-r--r-- | 0001-Remove_python_requests_cache_as_depends.patch | 60 | ||||
-rw-r--r-- | 0002-Replace_pyqt4_to_pyqt5_as_depends.patch | 60 | ||||
-rw-r--r-- | PKGBUILD | 73 |
4 files changed, 165 insertions, 86 deletions
@@ -1,58 +1,32 @@ pkgbase = netease-musicbox-git pkgdesc = A sexy command line interface musicbox for NetEase based on Python - pkgver = r567.4820cb0 + pkgver = r577.cdcbd50 pkgrel = 1 url = https://github.com/darknessomi/musicbox install = netease-musicbox-git.install arch = any license = MIT - makedepends = git - makedepends = python2 - makedepends = python2-requests - makedepends = python2-setuptools - makedepends = mpg123 - makedepends = python2-future - makedepends = python2-pycryptodomex - makedepends = python2-requests-cache - makedepends = python - makedepends = python-requests makedepends = python-setuptools - makedepends = mpg123 - makedepends = python-future - makedepends = python-pycryptodomex - makedepends = python-requests-cache + makedepends = git + depends = mpg123 + depends = python-pycryptodomex + depends = python-requests + depends = python-future optdepends = aria2: music caching optdepends = libnotify: notifications + optdepends = qt5-base: lyrics support + optdepends = python-pyqt5: lyrics support + optdepends = python-dbus: lyrics support provides = netease-musicbox conflicts = netease-musicbox - options = !emptydirs - source = git+https://github.com/darknessomi/musicbox + source = musicbox::git+https://github.com/darknessomi/musicbox + source = LICENSE::https://raw.githubusercontent.com/darknessomi/musicbox/master/LICENSE.txt + source = 0001-Remove_python_requests_cache_as_depends.patch + source = 0002-Replace_pyqt4_to_pyqt5_as_depends.patch sha256sums = SKIP + sha256sums = 50efc98142cfffe413d73c87c91f2687dfb774217af923f03dfdc8426c9d9552 + sha256sums = 0faefb24ad158814cda0a5fd2262c2308182d22791587382d68da09922338052 + sha256sums = f9c95f8441f43fc13c2cadb1f62b6e33658474f7671d11b3f0a66fe322e0a9e9 pkgname = netease-musicbox-git - depends = python - depends = python-requests - depends = python-setuptools - depends = mpg123 - depends = python-future - depends = python-pycryptodomex - depends = python-requests-cache - optdepends = aria2: music caching - optdepends = libnotify: notifications - optdepends = python-pyqt4: lyrics support - optdepends = python-dbus: lyrics support - -pkgname = netease-musicbox-py2-git - depends = python2 - depends = python2-requests - depends = python2-setuptools - depends = mpg123 - depends = python2-future - depends = python2-pycryptodomex - depends = python2-requests-cache - optdepends = aria2: music caching - optdepends = python2-keybinder2: global keybindings - optdepends = libnotify: notifications - optdepends = python2-pyqt4: lyrics support - optdepends = python2-dbus: lyrics support diff --git a/0001-Remove_python_requests_cache_as_depends.patch b/0001-Remove_python_requests_cache_as_depends.patch new file mode 100644 index 000000000000..2e250e49c64e --- /dev/null +++ b/0001-Remove_python_requests_cache_as_depends.patch @@ -0,0 +1,60 @@ +From e42f7f7ae526450315b6e693daa6ddc9fb1c7b53 Mon Sep 17 00:00:00 2001 +From: axionl <axionl@aosc.io> +Date: Wed, 29 Aug 2018 21:20:47 +0800 +Subject: [PATCH 1/2] Remove_python_requests_cache_as_depends + +--- + NEMbox/api.py | 7 +------ + requirements.txt | 1 - + setup.py | 1 - + 3 files changed, 1 insertion(+), 8 deletions(-) + +diff --git a/NEMbox/api.py b/NEMbox/api.py +index da4c0fb..6a4855b 100644 +--- a/NEMbox/api.py ++++ b/NEMbox/api.py +@@ -10,19 +10,14 @@ from __future__ import ( + ) + + import json ++import requests + from collections import OrderedDict + from http.cookiejar import LWPCookieJar +- +-import requests +-import requests_cache +- + from .config import Config + from .storage import Storage + from .encrypt import encrypted_request + from . import logger + +-requests_cache.install_cache('nemcache', expire_after=3600) +- + log = logger.getLogger(__name__) + + # 歌曲榜单地址 +diff --git a/requirements.txt b/requirements.txt +index eda4cbc..fe8c209 100644 +--- a/requirements.txt ++++ b/requirements.txt +@@ -1,4 +1,3 @@ + requests +-requests-cache + pycryptodomex + future +diff --git a/setup.py b/setup.py +index b457293..babf0ff 100644 +--- a/setup.py ++++ b/setup.py +@@ -53,7 +53,6 @@ setup( + license=about['__license__'], + packages=find_packages(), + install_requires=[ +- 'requests-cache', + 'pycryptodomex', + 'future', + ], +-- +2.18.0 + diff --git a/0002-Replace_pyqt4_to_pyqt5_as_depends.patch b/0002-Replace_pyqt4_to_pyqt5_as_depends.patch new file mode 100644 index 000000000000..299b340f8a69 --- /dev/null +++ b/0002-Replace_pyqt4_to_pyqt5_as_depends.patch @@ -0,0 +1,60 @@ +From 3288e1988bec9ba6a6d2b33fa90ea0024c4d7f7f Mon Sep 17 00:00:00 2001 +From: axionl <axionl@aosc.io> +Date: Wed, 29 Aug 2018 21:25:57 +0800 +Subject: [PATCH 2/2] Replace_pyqt4_to_pyqt5_as_depends + +--- + NEMbox/osdlyrics.py | 16 ++++++++-------- + 1 file changed, 8 insertions(+), 8 deletions(-) + +diff --git a/NEMbox/osdlyrics.py b/NEMbox/osdlyrics.py +index bd96e09..5e66843 100644 +--- a/NEMbox/osdlyrics.py ++++ b/NEMbox/osdlyrics.py +@@ -19,16 +19,16 @@ log = logger.getLogger(__name__) + config = Config() + + try: +- from PyQt4 import QtGui, QtCore, QtDBus ++ from PyQt5 import QtGui, QtWidgets, QtCore, QtDBus + pyqt_activity = True + except ImportError: + pyqt_activity = False +- log.warn("PyQt4 module not installed.") ++ log.warn("PyQt5 module not installed.") + log.warn("Osdlyrics Not Available.") + + if pyqt_activity: + +- class Lyrics(QtGui.QWidget): ++ class Lyrics(QtWidgets.QWidget): + + def __init__(self): + super(Lyrics, self).__init__() +@@ -52,10 +52,10 @@ if pyqt_activity: + self.setMinimumSize(600, 50) + osdlyrics_size = config.get("osdlyrics_size") + self.resize(osdlyrics_size[0], osdlyrics_size[1]) +- scn = QtGui.QApplication.desktop().screenNumber( +- QtGui.QApplication.desktop().cursor().pos()) +- bl = QtGui.QApplication.desktop().screenGeometry(scn).bottomLeft() +- br = QtGui.QApplication.desktop().screenGeometry(scn).bottomRight() ++ scn = QtWidgets.QApplication.desktop().screenNumber( ++ QtWidgets.QApplication.desktop().cursor().pos()) ++ bl = QtWidgets.QApplication.desktop().screenGeometry(scn).bottomLeft() ++ br = QtWidgets.QApplication.desktop().screenGeometry(scn).bottomRight() + bc = (bl + br) / 2 + frameGeo = self.frameGeometry() + frameGeo.moveCenter(bc) +@@ -114,7 +114,7 @@ if pyqt_activity: + + def show_lyrics(): + +- app = QtGui.QApplication(sys.argv) ++ app = QtWidgets.QApplication(sys.argv) + lyrics = Lyrics() + QtDBus.QDBusConnection.sessionBus().registerService('org.musicbox.Bus') + QtDBus.QDBusConnection.sessionBus().registerObject('/', lyrics) +-- +2.18.0 + @@ -1,65 +1,50 @@ # Maintainer: Jiachen Yang <farseerfc@gmail.com> -# Contributor: Ariel AxionL <axionl@aosc.io> +# Maintainer: Ariel AxionL <axiionl@aosc.io> -pkgbase=netease-musicbox-git -pkgname=(netease-musicbox-git netease-musicbox-py2-git) +pkgname=netease-musicbox-git _gitname=musicbox -pkgver=r567.4820cb0 +pkgver=r577.cdcbd50 pkgrel=1 pkgdesc="A sexy command line interface musicbox for NetEase based on Python" arch=(any) url="https://github.com/darknessomi/musicbox" -depends=() +depends=('mpg123' 'python-pycryptodomex' 'python-requests' 'python-future') +makedepends=('python-setuptools' 'git') optdepends=('aria2: music caching' - 'libnotify: notifications') -license=('MIT') -_py2depends=('python2' 'python2-requests' 'python2-setuptools' 'mpg123' - 'python2-future' 'python2-pycryptodomex' 'python2-requests-cache') -_py3depends=('python' 'python-requests' 'python-setuptools' 'mpg123' - 'python-future' 'python-pycryptodomex' 'python-requests-cache') -makedepends=('git' - ${_py2depends[@]} - ${_py3depends[@]} -) # both python and python2 depends goes to makedepends -options=(!emptydirs) + 'libnotify: notifications' + 'qt5-base: lyrics support' + 'python-pyqt5: lyrics support' + 'python-dbus: lyrics support') provides=('netease-musicbox') conflicts=('netease-musicbox') -install=$pkgname.install +install=${pkgname}.install +license=('MIT') -source=("git+https://github.com/darknessomi/musicbox") +source=("${_gitname}::git+https://github.com/darknessomi/musicbox" + "LICENSE::https://raw.githubusercontent.com/darknessomi/musicbox/master/LICENSE.txt" + "0001-Remove_python_requests_cache_as_depends.patch" + "0002-Replace_pyqt4_to_pyqt5_as_depends.patch") -sha256sums=('SKIP') +sha256sums=('SKIP' + '50efc98142cfffe413d73c87c91f2687dfb774217af923f03dfdc8426c9d9552' + '0faefb24ad158814cda0a5fd2262c2308182d22791587382d68da09922338052' + 'f9c95f8441f43fc13c2cadb1f62b6e33658474f7671d11b3f0a66fe322e0a9e9') pkgver() { - cd $_gitname + cd "${srcdir}/${_gitname}" printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" } -package_netease-musicbox-py2-git() { - replace=("netease-musicbox-git<=r515.7dfd3fe-1") - depends=(${_py2depends[@]}) - optdepends=('aria2: music caching' - 'python2-keybinder2: global keybindings' - 'libnotify: notifications' - 'python2-pyqt4: lyrics support' - 'python2-dbus: lyrics support' - ) - cd "$srcdir/$_gitname" - python2 setup.py install --root="$pkgdir/" --optimize=1 - mkdir -p "${pkgdir}/usr/share/licenses/${pkgname}" - install -m755 LICENSE.txt "${pkgdir}/usr/share/licenses/${pkgname}/" +prepare() { + cd "${srcdir}/${_gitname}" + git apply "${srcdir}/0001-Remove_python_requests_cache_as_depends.patch" + git apply "${srcdir}/0002-Replace_pyqt4_to_pyqt5_as_depends.patch" } -package_netease-musicbox-git() { - depends=(${_py3depends[@]}) - optdepends=('aria2: music caching' - 'libnotify: notifications' - 'python-pyqt4: lyrics support' - 'python-dbus: lyrics support' - ) - cd "$srcdir/$_gitname" - python setup.py install --root="$pkgdir/" --optimize=1 +package() { + install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" + cd "${srcdir}/${_gitname}" + python setup.py install --root="${pkgdir}/" --optimize=1 mkdir -p "${pkgdir}/usr/share/licenses/${pkgname}" - install -m755 LICENSE.txt "${pkgdir}/usr/share/licenses/${pkgname}/" } -# vim:set ts=2 sw=2 et: +# vim:set ts=2 sw=2 et:
\ No newline at end of file |