aboutsummaryrefslogtreecommitdiffstats
path: root/snippets/spec.snippets
diff options
context:
space:
mode:
authorMatěj Cepl <mcepl@cepl.eu>2019-11-02 21:34:59 +0100
committerMatěj Cepl <mcepl@cepl.eu>2024-03-28 16:56:38 +0100
commit82d86bebd9bd8345bfe70534dd838d9d6f6dd181 (patch)
treee80e87a86a8c968feafb303bc5e8ad1b24426f63 /snippets/spec.snippets
parente52bee00866b98bd1940aa4c845ab30aae1fcdfe (diff)
downloadvim-suse-changes-82d86bebd9bd8345bfe70534dd838d9d6f6dd181.tar.gz
feat(snippets): add snippets for SPEC files.
Diffstat (limited to 'snippets/spec.snippets')
-rw-r--r--snippets/spec.snippets39
1 files changed, 39 insertions, 0 deletions
diff --git a/snippets/spec.snippets b/snippets/spec.snippets
new file mode 100644
index 0000000..e689be7
--- /dev/null
+++ b/snippets/spec.snippets
@@ -0,0 +1,39 @@
+snippet fdup
+ %python_expand %fdupes %{buildroot}%{$python_sitelib}
+
+snippet nopy
+ %define skip_python3 1
+
+snippet pyurl
+ Source: https://pypi.python.org/packages/source/X/%{modname}/%{modname}-%{version}.tar.gz
+
+snippet ghurl
+ Source: https://github.com/XXX/%{modname}/archive/v%{version}/%{modname}-%{version}.tar.gz
+
+snippet pycache
+ %pycache_only %{python_sitelib}/__pycache__
+
+snippet pyt
+ %python_expand py.test-%{$python_bin_suffix} -v
+
+snippet patch
+ # PATCH-{FIX|FEATURE}-{OPENSUSE|SLE|UPSTREAM} name-of-file.patch bsc#[0-9]+ mcepl@suse.com
+ # this patch makes things totally awesome
+
+snippet pyc
+ $python -m compileall -d %{$python_sitelib} %{buildroot}%{$python_sitelib}/hypothesis/
+ $python -O -m compileall -d %{$python_sitelib} %{buildroot}%{$python_sitelib}/hypothesis/
+
+snippet lic
+ %{?!license:%define license %doc}
+
+snippet multi
+ %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}