blob: 2870be4cc873a433b22f906eb214bb040d02bdfc (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
|
# Maintainer: txtsd <aur.archlinux@ihavea.quest>
# Contributor: Marco Rubin <marco.rubin@protonmail.com>
# Contributor: Alexander F. Rødseth <xyproto@archlinux.org>
# Contributor: David Runge <dvzrv@archlinux.org>
# Contributor: Panagiotis Mavrogiorgos <pmav99@gmail.com>
pkgname=nuitka
pkgver=2.5.9
pkgrel=3
pkgdesc='Python compiler with full language support and CPython compatibility'
arch=(any)
url='https://nuitka.net'
license=(Apache-2.0)
depends=(
fuse2
gdb
libxml2
patchelf
python
python-appdirs
python-jinja
python-ordered-set
python-pyyaml
python-setuptools
python-six
python-tqdm
python-zstandard
scons
)
makedepends=(
python-build
python-installer
python-wheel
)
checkdepends=(
ccache
python-boto3
python-brotli
strace
)
optdepends=('ccache: for caching builds')
options=(!debug lto)
source=("https://github.com/Nuitka/Nuitka/archive/refs/tags/${pkgver}.tar.gz")
sha256sums=('1262be7189593db04c58a6af792f71c7ea0b34f71a54a323f693e39386b47ed2')
build() {
cd ${pkgname^}-${pkgver}
python -m build --wheel --no-isolation
}
check() {
cd ${pkgname^}-${pkgver}
# Needed to make LTO work with GCC
export CFLAGS="-fuse-linker-plugin"
# Catch testing failures early
echo '==> tests/basics/EmptyModuleTest.py'
bin/nuitka --module --show-scons --run --report=compilation-report-module.xml --experimental=debug-report-traceback tests/basics/EmptyModuleTest.py
bin/nuitka --show-scons --run --report=compilation-report-exe.xml --experimental=debug-report-traceback tests/basics/EmptyModuleTest.py
# Catch testing failures early
echo '==> data_files/DataFilesMain.py'
bin/nuitka --show-scons --run --report=compilation-report-exe.xml --experimental=debug-report-traceback tests/plugins/data_files/DataFilesMain.py
# Check that compilation works
echo 'print("[x] Can compile main.py to an executable.\n[x] Can run the resulting executable.")' > main.py
bin/nuitka --output-filename=main --lto=yes --show-scons main.py
./main
# Tests were disabled. See:
# https://github.com/Nuitka/Nuitka/issues/2595
# https://github.com/Nuitka/Nuitka/issues/2609
# https://github.com/Nuitka/Nuitka/issues/3272
# https://github.com/Nuitka/Nuitka/issues/3284
./tests/run-tests --skip-standalone-tests --skip-reflection-test --no-other-python
}
package() {
cd ${pkgname^}-${pkgver}
python -m installer --destdir="${pkgdir}" dist/*.whl
install -vDm644 {Changelog,Developer_Manual,README}.rst -t "${pkgdir}/usr/share/doc/${pkgname}/"
}
|