summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorSam2023-01-26 02:04:45 +0000
committerSam2023-01-26 02:04:45 +0000
commit1c186c5f8e755078a326f792bafaffc48a552a32 (patch)
tree5b157bd0c974fb1af0aa55c6366ba5e03ace4074
parent8b13fb575f407037c7d4b27e885db825b0a0f4f1 (diff)
downloadaur-pyinstaller-git.tar.gz
updpkg: pyinstaller-git 5.7.0.r8648.g5a73ea4f7-1
-rw-r--r--.SRCINFO34
-rw-r--r--PKGBUILD116
2 files changed, 120 insertions, 30 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 6ff0a7469bd3..1aa4072b350d 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,30 +1,44 @@
pkgbase = pyinstaller-git
pkgdesc = Bundles a Python application and all its dependencies into a single package
- pkgver = 5.2.r8410.gc7040cb65
+ pkgver = 5.7.0.r8648.g5a73ea4f7
pkgrel = 1
url = http://www.pyinstaller.org
- arch = x86_64
- arch = i686
- arch = aarch64
- arch = ppc64le
- arch = s390x
+ arch = any
+ license = GPL2
+ license = Apache
license = custom:PyInstaller
+ checkdepends = python-pytest
+ checkdepends = python-execnet>=1.5.0
+ checkdepends = python-psutil
+ checkdepends = python-lxml
+ checkdepends = python-tinyaes>=1.0.0
+ checkdepends = python-pytest-timeout>=2.0.0
+ checkdepends = python-flaky
+ checkdepends = python-pytest-timeout
+ checkdepends = python-pytest-drop-dup-tests
+ checkdepends = python-pytest-rerunfailures
+ checkdepends = python-pytest-xdist
+ makedepends = zlib
makedepends = cmocka
makedepends = git
makedepends = python-installer
makedepends = python-build
makedepends = python-wheel
+ makedepends = python-setuptools
depends = python-altgraph
depends = pyinstaller-hooks-contrib>=2021.4
depends = python>=3.7
- depends = python<3.11
- depends = python-setuptools
+ depends = python<3.12
+ depends = python-setuptools>=42.0.0
+ depends = binutils
+ depends = mpdecimal
optdepends = python-tinyaes>=1.0.0: bytecode encryption support
optdepends = python-importlib-metadata: support for python 3.8 and lower
+ optdepends = python-importlib_resources: support for python 3.8 and lower
provides = pyinstaller
conflicts = pyinstaller
source = git+https://github.com/pyinstaller/pyinstaller
- sha256sums = SKIP
- depends_i686 = lib32-zlib
+ sha512sums = SKIP
+ b2sums = SKIP
pkgname = pyinstaller-git
diff --git a/PKGBUILD b/PKGBUILD
index 138f66bfee5c..f835f60132e2 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,61 +2,137 @@
# Contributor: xantares
# Contributor: ase1590
-# shellcheck disable=2034,2148,2154
+# shellcheck disable=2034,2148,2154,2155
pkgname=pyinstaller-git
-_pkgname=pyinstaller
-pkgver=5.2.r8410.gc7040cb65
+_pkgbase="${pkgname%-git}"
+_pkgname="${_pkgbase#python-}"
+pkgver=5.7.0.r8648.g5a73ea4f7
pkgrel=1
pkgdesc="Bundles a Python application and all its dependencies into a single package"
-arch=('x86_64' 'i686' 'aarch64' 'ppc64le' 's390x')
+arch=('any')
url="http://www.pyinstaller.org"
-license=('custom:PyInstaller')
+license=('GPL2' 'Apache' 'custom:PyInstaller')
depends=(
"python-altgraph"
"pyinstaller-hooks-contrib>=2021.4"
"python>=3.7"
- "python<3.11"
- "python-setuptools"
+ "python<3.12"
+ "python-setuptools>=42.0.0"
+ "binutils"
+ "mpdecimal"
)
-depends_i686=('lib32-zlib')
makedepends=(
+ "zlib"
"cmocka"
"git"
"python-installer"
"python-build"
"python-wheel"
+ "python-setuptools"
+)
+checkdepends=(
+ # Testing framework.
+ "python-pytest"
+ # Work-around for a bug in execnet 1.4.1
+ "python-execnet>=1.5.0"
+ # Better subprocess alternative with implemented timeout.
+ "python-psutil"
+ # These are required by some of basic tests
+ "python-lxml"
+ "python-tinyaes>=1.0.0"
+ # Plugin to abort hanging tests.
+ "python-pytest-timeout>=2.0.0"
+ # Ability to retry a failed test
+ "python-flaky"
+ # Plugin to abort hanging tests.
+ "python-pytest-timeout"
+ # allows specifying order without duplicates
+ "python-pytest-drop-dup-tests"
+ # reruns failed flaky tests
+ "python-pytest-rerunfailures"
+ # parallel processing for tests
+ "python-pytest-xdist"
)
optdepends=(
"python-tinyaes>=1.0.0: bytecode encryption support"
"python-importlib-metadata: support for python 3.8 and lower"
+ "python-importlib_resources: support for python 3.8 and lower"
)
-provides=('pyinstaller')
-conflicts=('pyinstaller')
+provides=("$_pkgbase")
+conflicts=("$_pkgbase")
source=("git+https://github.com/$_pkgname/$_pkgname")
-sha256sums=('SKIP')
+sha512sums=('SKIP')
+b2sums=('SKIP')
pkgver() {
- cd "${_pkgname}" || exit
+ cd "${_pkgname}" || exit 1
commit=$(printf "r%s.g%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)")
- ver=$(grep -E "^__version__" PyInstaller/__init__.py | sed -re "s|.* = '(.*)'$|\1|g")
+ ver=$(python setup.py --version)
echo "${ver//-/_}.${commit}"
}
+prepare() {
+ local python_version=$(python -c 'import sys; print("".join(map(str, sys.version_info[:2])))')
+ if [[ $python_version -lt 39 ]]; then
+ depends+=("python-importlib-metadata")
+ checkdepends+=("python-importlib_resources")
+ fi
+}
+
build() {
- cd "$srcdir/$_pkgname" || exit
+ cd "$_pkgname" || exit 1
+ # Forcing bootloader build for the current platform
+ # and removing the unnecessary pre-builts
rm -rvf PyInstaller/bootloader/Darwin*
rm -rvf PyInstaller/bootloader/Windows*
- [ "$CARCH" != "i686" ] && rm -rvf PyInstaller/bootloader/Linux-32bit*
- (
- cd bootloader || exit
- python ./waf all
- )
+ rm -rvf PyInstaller/bootloader/Linux*
python -m build --wheel --no-isolation
}
+check() {
+ cd "$_pkgname" || exit 1
+
+ # The tests use an installed version of PyInstaller dist + bootloader
+ # to run properly, and dogfood on that module for a lot of basic tests.
+ # Temporarily extracting the built wheel to build to test it out.
+ python -m installer --destdir="$srcdir/$_pkgname/build" dist/*.whl
+ local site_packages=$(python -c "import site; print(site.getsitepackages()[0])")
+
+ # Disabling several tests that are not relevant to the release of this pkg
+ # test_macos_bundle_signing - macos only
+ # test_apple_events - macos only
+ # test_pywin32 - win32 only
+ # test_hooks - needs additional libraries (will vary by libs installed by user)
+ # test_libraries - needs additional libraries (will vary by libs installed by user)
+ # test_django - needs additional libraries (will vary by libs installed by user)
+ # test_qt - needs additional libraries (hit or miss, works in chroot/clean system, but fails on daily driver)
+ # test_django - needs additional libraries (will vary by libs installed by user)
+ # test_interactive - needs ui-interface (will always fail on headless system)
+
+ PYTHONPATH="$srcdir/$_pkgname/build/$site_packages" \
+ QT_QPA_PLATFORM="offscreen" \
+ pytest \
+ -m "not darwin and not win32" \
+ --ignore "tests/functional/test_macos_bundle_signing.py" \
+ --ignore "tests/functional/test_apple_events.py" \
+ --ignore "tests/functional/test_pywin32.py" \
+ --ignore-glob "tests/functional/test_hooks/**" \
+ --ignore "tests/functional/test_libraries.py" \
+ --ignore "tests/functional/test_django.py" \
+ --ignore "tests/functional/test_qt.py" \
+ --ignore "tests/functional/test_interactive.py" \
+ --maxfail=3 \
+ -n=auto --maxprocesses="${PYTEST_XDIST_AUTO_NUM_WORKERS:-2}" \
+ --dist=load \
+ --force-flaky --no-flaky-report --reruns=3 --reruns-delay=10
+
+ # cleanup temporary wheel extraction
+ rm -rf "$srcdir/$_pkgname/build/usr"
+}
+
package() {
- cd "$srcdir/$_pkgname" || exit
+ cd "$_pkgname" || exit 1
python -m installer --destdir="$pkgdir" dist/*.whl
install -vDm 644 "COPYING.txt" -t "$pkgdir/usr/share/licenses/$pkgname/"
install -vDm 644 "README.rst" -t "$pkgdir/usr/share/doc/$pkgname/"