// 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/ { "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-{FIX|FEATURE}-{OPENSUSE|SLE|UPSTREAM} ${1:filename} ${2:bugno} mcepl@suse.com", "# this patch makes things totally awesome", "Patch0: $1" ], "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" } }