summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2022-01-25 22:55:01 +0100
committerMichał Górny <mgorny@gentoo.org>2022-01-26 09:28:43 +0100
commitdad100bf745aef2739c56ac53c7d34c84956c0eb (patch)
tree61231d72890cd97af17a766fdbc7f40b2382987c
parentnewebuild: Modernize the Python template (diff)
downloadgentoo-syntax-dad100bf745aef2739c56ac53c7d34c84956c0eb.tar.gz
gentoo-syntax-dad100bf745aef2739c56ac53c7d34c84956c0eb.tar.bz2
gentoo-syntax-dad100bf745aef2739c56ac53c7d34c84956c0eb.zip
newmetadata: Include pypi remote-idgentoo-syntax-20220126
Signed-off-by: Michał Górny <mgorny@gentoo.org> Closes: https://github.com/gentoo/gentoo-syntax/pull/38 Signed-off-by: Michał Górny <mgorny@gentoo.org>
-rw-r--r--plugin/newmetadata.vim7
1 files changed, 7 insertions, 0 deletions
diff --git a/plugin/newmetadata.vim b/plugin/newmetadata.vim
index 356bb8c..82f5e07 100644
--- a/plugin/newmetadata.vim
+++ b/plugin/newmetadata.vim
@@ -27,6 +27,8 @@ fun! <SID>MakeNewMetadata()
else
let l:category = substitute(l:filename,
\ "^.*/\\([^/]\\+\\)/[^/]\\+/metadata\\.xml", "\\1", "g")
+ let l:package = substitute(l:filename,
+ \ "^.*/\\([^/]\\+\\)/metadata\\.xml", "\\1", "g")
let l:iscatmetadata = 0
let l:user = GentooGetUser()
let l:email = matchstr(l:user, "\\(<\\)\\@<=[^>]\\+\\(>\\)\\@=")
@@ -83,6 +85,11 @@ fun! <SID>MakeNewMetadata()
put ='<name>' . l:name . '</name>'
endif
put ='</maintainer>'
+ if l:category ==# "dev-python"
+ put ='<upstream>'
+ put ='<remote-id type=\"pypi\">' . l:package . '</remote-id>'
+ put ='</upstream>'
+ endif
put ='</pkgmetadata>'
exec "normal gg=G"
" }}}