aboutsummaryrefslogtreecommitdiffhomepage
path: root/internal/rosa/package/python/package.az
blob: 706992509491aa1ff3673769aa9b48e918cd40e2 (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
package python {
	description = "the Python programming language interpreter";
	website = "https://www.python.org";
	anitya = 13254;

	version* = "3.14.5";
	source = remoteTar {
		url = "https://www.python.org/ftp/python/"+version+
			"/Python-"+version+".tgz";
		checksum = "zYIpDlk2ftZ-UVGCQS1rthle2OHoyXV653ztWiopKV1NhmIJf1K2hHbkwM4DozQ9";
		compress = gzip;
	};
	patches = [ "zipfile-no-default-strict_timestamps.patch" ];

	// test_synopsis_sourceless assumes this is writable and checks __pycache__
	writable = true;
	chmod = true;

	env = [
		"EXTRATESTOPTS=-j0 -x " + join {
			elems = [
				// requires internet access (http://www.pythontest.net/)
				"test_asyncio",
				"test_socket",
				"test_urllib2",
				"test_urllibnet",
				"test_urllib2net",

				// makes assumptions about uid_map/gid_map
				"test_os",
				"test_subprocess",

				// patched out insane strict_timestamps default
				"test_zipfile",

				// requires gcc
				"test_ctypes",

				// breaks on llvm
				"test_dbm_gnu",
			];
			sep = " -x ";
		},

		// _ctypes appears to infer something from the linker name
		"LDFLAGS=-Wl,--dynamic-linker=/system/lib/" +
			"ld-musl-" + linuxArch + ".so.1",
	];

	exec = make {
		check = [ "test" ];
	};

	inputs = [
		zlib,
		bzip2,
		libffi,
		openssl,

		pkg-config,
		xz,
	];

	runtime = [
		zlib,
		bzip2,
		libffi,
		openssl,
	];
}