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
87
88
89
90
91
92
93
94
95
96
97
|
{
"nopy" : {
"prefix" : "nopy",
"body" : [
"%define skip_python2 1"
],
"description" : "Don't build for Python 2"
},
"pycache" : {
"prefix" : "pycache",
"body" : [
"%pycache_only %{python_sitelib}/__pycache__"
],
"description" : "Definition of Python cache files into %files"
},
"sedpy" : {
"prefix" : "sedpy",
"body" : [
"sed -i -e '1s@/usr/bin/env python@/usr/bin/python@'"
],
"description" : "Remove env python construct"
},
"pyc" : {
"prefix" : "pyc",
"body" : [
"$python -m compileall -d %{$python_sitelib} {buildroot}%{$python_sitelib}/%{modname}/",
"$python -O -m compileall -d %{$python_sitelib} %{buildroot}%{$python_sitelib}/%{modname}/"
],
"description" : "Compile Python modules"
},
"lic" : {
"prefix" : "lic",
"body" : [
"%{?!license:%define license %doc}"
],
"description" : "Missing definition of %license"
},
"fdup" : {
"prefix" : "fdup",
"body" : [
"%python_expand %fdupes %{buildroot}%{$python_sitelib}"
],
"description" : "Deduplication"
},
"patch" : {
"prefix" : "patch",
"body" : [
"# PATCH-${1|FIX,FEATURE|}-${2|UPSTREAM,OPENSUSE,SLE|} ${3:filename} ${4:bugno} mcepl@suse.com",
"# this patch makes things totally awesome",
"Patch0: $3"
],
"description" : "Patch definition"
},
"alt" : {
"prefix" : "alt",
"body" : [
"Requires(post): update-alternatives",
"Requires(postun): update-alternatives",
"%python_clone -a ${1:execname}",
"%post",
"%python_install_alternative $1",
"",
"%postun",
"%python_uninstall_alternative $1"
],
"description" : "configuration of alternatives"
},
"multi" : {
"prefix" : "multi",
"body" : [
"%global flavor @BUILD_FLAVOR@%{nil}",
"%if \"%{flavor}\" == \"test\"",
"%define psuffix -test",
"%bcond_without test",
"%else",
"%define psuffix %{nil}",
"%bcond_with test",
"%endif",
"Name: python-${1:name}%{psuffix}"
],
"description" : "configuration of multibuild"
},
"ghurl" : {
"prefix" : "ghurl",
"body" : [
"Source: https://github.com/XXX/%{modname}/archive/v%{version}.tar.gz#/%{modname}-%{version}.tar.gz"
],
"description" : "URL of the upstream tarball on GitHub"
},
"pyurl" : {
"prefix" : "pyurl",
"body" : [
"Source: https://files.pythonhosted.org/packages/source/XXX/%{modname}/%{modname}-%{version}.tar.gz"
],
"description" : "URL of the upstream tarball on PyPI"
}
}
|