diff options
author | Matěj Cepl <mcepl@cepl.eu> | 2021-04-17 19:57:16 +0200 |
---|---|---|
committer | Matěj Cepl <mcepl@cepl.eu> | 2024-03-28 17:03:29 +0100 |
commit | 5982329d8f37d7c4f1a2fdaa8ab3404198aaa339 (patch) | |
tree | 179d3cc532d6336a9f0cb201665bb4adede38120 /snippets/spec.json | |
parent | 95af3dc1bb19c66ce29cf928782bae4f545247e9 (diff) | |
download | vim-suse-changes-5982329d8f37d7c4f1a2fdaa8ab3404198aaa339.tar.gz |
fix(snippets): convert remaining snippets to VSCode format
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" }, |