mirror of
https://github.com/pentoo/pentoo-overlay
synced 2026-05-08 12:30:44 +02:00
gplaycli: add pyaxmlparser optional flag
This commit is contained in:
parent
bc1fe61589
commit
a6ec59c401
2 changed files with 79 additions and 0 deletions
42
app-misc/gplaycli/files/pyaxmlparser.patch
Normal file
42
app-misc/gplaycli/files/pyaxmlparser.patch
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
reverted:
|
||||
--- b/gplaycli/gplaycli.py
|
||||
+++ a/gplaycli/gplaycli.py
|
||||
@@ -32,7 +32,7 @@
|
||||
from gpapi.googleplay import RequestError
|
||||
from google.protobuf.message import DecodeError
|
||||
from pkg_resources import get_distribution, DistributionNotFound
|
||||
+from pyaxmlparser import APK
|
||||
-from androguard.core.bytecodes.apk import APK
|
||||
|
||||
from clint.textui import progress
|
||||
|
||||
@@ -494,7 +494,7 @@
|
||||
apk = APK(filepath)
|
||||
packagename = apk.package
|
||||
package_bunch.append(packagename)
|
||||
+ version_codes.append(util.vcode(apk.version_code))
|
||||
- version_codes.append(util.vcode(apk.get_androidversion_code()))
|
||||
|
||||
# BulkDetails requires only one HTTP request
|
||||
# Get APK info from store
|
||||
reverted:
|
||||
--- b/requirements.txt
|
||||
+++ a/requirements.txt
|
||||
@@ -1,4 +1,4 @@
|
||||
protobuf
|
||||
gpapi
|
||||
+pyaxmlparser
|
||||
-androguard
|
||||
clint
|
||||
reverted:
|
||||
--- b/setup.py
|
||||
+++ a/setup.py
|
||||
@@ -33,7 +33,7 @@
|
||||
install_requires=[
|
||||
'protobuf',
|
||||
'gpapi == 0.4.2',
|
||||
+ 'pyaxmlparser',
|
||||
- 'androguard',
|
||||
'clint',
|
||||
],
|
||||
)
|
||||
37
app-misc/gplaycli/gplaycli-3.22-r1.ebuild
Normal file
37
app-misc/gplaycli/gplaycli-3.22-r1.ebuild
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
# Copyright 1999-2018 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=6
|
||||
|
||||
PYTHON_COMPAT=( python3_{5,6} )
|
||||
inherit distutils-r1
|
||||
|
||||
DESCRIPTION="Google Play Downloader via Command line"
|
||||
HOMEPAGE="https://github.com/matlink/gplaycli"
|
||||
SRC_URI="https://github.com/matlink/gplaycli/archive/${PV}.tar.gz -> ${P}.tar.gz"
|
||||
|
||||
LICENSE="AGPL-3"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~x86"
|
||||
IUSE="pyaxmlparser"
|
||||
|
||||
#https://github.com/matlink/gplaycli/issues/182
|
||||
change_deps() {
|
||||
PATCHES=( "${FILESDIR}/pyaxmlparser.patch" )
|
||||
}
|
||||
|
||||
RDEPEND="dev-python/protobuf-python[${PYTHON_USEDEP}]
|
||||
>=dev-python/gpapi-0.4.2[${PYTHON_USEDEP}]
|
||||
pyaxmlparser? ( dev-python/pyaxmlparser[${PYTHON_USEDEP}] )
|
||||
!pyaxmlparser? ( dev-python/androguard[${PYTHON_USEDEP}] )
|
||||
dev-python/clint[${PYTHON_USEDEP}]"
|
||||
DEPEND="${RDEPEND}
|
||||
dev-python/setuptools[${PYTHON_USEDEP}]"
|
||||
|
||||
python_prepare_all() {
|
||||
use pyaxmlparser && change_deps
|
||||
|
||||
# disarm pycrypto dep to allow || ( pycryptodome pycrypto )
|
||||
sed -i -e "s|os.path.expanduser('~')+'/.config/|'/etc/|" setup.py || die
|
||||
distutils-r1_python_prepare_all
|
||||
}
|
||||
Loading…
Reference in a new issue