diff options
Diffstat (limited to 'snippets/spec.json')
-rw-r--r-- | snippets/spec.json | 48 |
1 files changed, 32 insertions, 16 deletions
diff --git a/snippets/spec.json b/snippets/spec.json index b8425be..9657df0 100644 --- a/snippets/spec.json +++ b/snippets/spec.json @@ -1,17 +1,33 @@ -// snippet sedpy -// sed -i -e '1s@/usr/bin/env python@/usr/bin/python@' -// -// snippet nopy -// %define skip_python2 1 -// -// snippet pycache -// %pycache_only %{python_sitelib}/__pycache__ -// -// snippet pyc -// $python -m compileall -d %{$python_sitelib} %{buildroot}%{$python_sitelib}/hypothesis/ -// $python -O -m compileall -d %{$python_sitelib} %{buildroot}%{$python_sitelib}/hypothesis/ - { + "nopy" : { + "prefix" : "nopy", + "body" : [ + "%define skip_python2 1" + ], + "description" : "Don't build for Python 2" + }, + "sedpy" : { + "prefix" : "sedpy", + "body" : [ + "%pycache_only %{python_sitelib}/__pycache__" + ], + "description" : "Definition of Python cache files into %files" + }, + "pycache" : { + "prefix" : "pycache", + "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" : [ @@ -22,16 +38,16 @@ "fdup" : { "prefix" : "fdup", "body" : [ - "%python_expand %fdupes %{buildroot}%{\$python_sitelib}" + "%python_expand %fdupes %{buildroot}%{$python_sitelib}" ], "description" : "Deduplication" }, "patch" : { "prefix" : "patch", "body" : [ - "# PATCH-{FIX|FEATURE}-{OPENSUSE|SLE|UPSTREAM} ${1:filename} ${2:bugno} mcepl@suse.com", + "# PATCH-${1|FIX,FEATURE|}-${2|OPENSUSE,SLE,UPSTREAM|} ${3:filename} ${4:bugno} mcepl@suse.com", "# this patch makes things totally awesome", - "Patch0: $1" + "Patch0: $3" ], "description" : "Patch definition" }, |