summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD65
1 files changed, 39 insertions, 26 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 9bf0154b1b5..bf55d79c819 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,38 +1,51 @@
-# Maintainer: Mark Wagie <mark dot wagie at tutanota dot com>
+# Maintainer: Sam <dev at samarthj dot com>
+# Contributor: Mark Wagie <mark dot wagie at tutanota dot com>
# Contributor: Mehmet Ozgur Bayhan <mozgurbayhan at gmail.com>
# Contributor: Thomas Quillan <tjquillan at gmail.com>
# Contributor: iboyperson <tjquillan at gmail dot com>
# Contributor: Alessandro Pazzaglia <jackdroido at gmail dot com>
+
+# shellcheck disable=2034,2148,2154
+
pkgname=pyinstaller
-pkgver=4.2
+_pkgname=pyinstaller
+pkgver=4.5.1
pkgrel=1
pkgdesc="Bundles a Python application and all its dependencies into a single package"
-arch=('x86_64')
-url="https://github.com/pyinstaller/pyinstaller"
-license=('GPL')
+arch=('x86_64' 'i686' 'aarch64')
+url="http://www.pyinstaller.org"
+license=('custom:PyInstaller')
depends=('python-altgraph' 'pyinstaller-hooks-contrib')
-makedepends=('python-setuptools')
-#checkdepends=('python-pytest-xdist' 'python-pytest-timeout' 'flake8' 'python-flaky')
-# #'pytest-drop-dup-tests' 'python-tinyaes'
+makedepends=("python-pip")
optdepends=('python-pycrypto: bytecode encryption support'
- 'upx: executable compression support')
-source=("https://pypi.org/packages/source/${pkgname:0:1}/$pkgname/$pkgname-$pkgver.tar.gz")
-sha256sums=('f5c0eeb2aa663cce9a5404292c0195011fa500a6501c873a466b2e8cad3c950c')
-
-build() {
- cd "$pkgname-$pkgver"
- python setup.py build
-}
-
-#check() {
-# cd "$pkgname-$pkgver"
-
-# # Run only the unit and functional tests, but not the huge library test-suite
-# pytest tests/unit tests/functional -k "not tests/functional/test_libraries.py"
-#}
+ 'upx: executable compression support')
+_pkgname_prefix="${_pkgname:0:1}"
+_pkgname_underscored="${_pkgname//-/_}"
+_py="py3"
+_py_hosted_url="https://files.pythonhosted.org/packages/$_py"
+_pkg_whlname_prefix="$_pkgname_underscored-$pkgver-$_py-none-manylinux2014"
+_pkg_whlname_x86_64="${_pkg_whlname_prefix}_x86_64.whl"
+_pkg_whlname_i686="${_pkg_whlname_prefix}_i686.whl"
+_pkg_whlname_aarch64="${_pkg_whlname_prefix}_aarch64.whl"
+source_x86_64=("$_py_hosted_url/$_pkgname_prefix/$_pkgname/$_pkg_whlname_x86_64")
+source_i686=("$_py_hosted_url/$_pkgname_prefix/$_pkgname/$_pkg_whlname_i686")
+source_aarch64=("$_py_hosted_url/$_pkgname_prefix/$_pkgname/$_pkg_whlname_aarch64")
+sha512sums_x86_64=('29454c824829a82e85ef14debdcb8e95a0d1b74e32f100509d9d71919c424ce63a8e5e92fc6fe80a2b57fcc410294a24d1addfcb322a662675ed04f65166c29b')
+sha512sums_i686=('a81c0d7df9b639e2936eb73e7abbac07e2e1f116c8a259370904551ed86e74d0fa7c1c98c2e3fbc8262564dcf4f6da4dcdbd3c1c1e62e47784ef98eb12aabc53')
+sha512sums_aarch64=('4f1fd8da1f3bea146b7f2ea352821465d9f08d70f3aeff4c11845bce4cfe2a590230e5561eb55d1dc97b6c5ce75c0d9a9b6b74ad4b6e899ad63ba7ba8bc6f98e')
package() {
- cd "$pkgname-$pkgver"
- export PYTHONHASHSEED=0
- python setup.py install --root="$pkgdir/" --optimize=1 --skip-build
+ cd "$srcdir" || exit
+ PIP_CONFIG_FILE=/dev/null pip install \
+ --root="$pkgdir" \
+ --isolated \
+ --ignore-installed \
+ --no-deps \
+ --no-compile \
+ --no-warn-script-location \
+ "${_pkg_whlname_prefix}_${CARCH}.whl"
+ python -O -m compileall -j "$(nproc)" -s "$pkgdir" "$pkgdir/usr/lib/"
+ mapfile -t direct_url_file < <(find "$pkgdir"/usr/lib -type f -name 'direct_url.json')
+ rm -rvf "${direct_url_file[@]}" || true
+ install -Dm644 "${_pkgname//-/_}-$pkgver.dist-info/COPYING.txt" "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}