{ "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" : [ "%{?!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|OPENSUSE,SLE,UPSTREAM|} ${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" } }