void-packages/srcpkgs/python-nose/template
Đoàn Trần Công Danh 49cb564d14 srcpkgs/p*: convert patches to -Np1
* par is kept at -Np0

```sh
git grep -l '^patch_args=-Np0' "srcpkgs/$1*/template" |
while read template; do
	for p in ${template%/template}/patches/*; do
		sed -i '
			\,^[+-][+-][+-] /dev/null,b
			/^[*-]\+ [0-9]\+\(,[0-9]\+\)\? [*-]\+$/b
			s,^[*][*][*] ,&a/,
			/^--- /{
				s,\(^--- \)\(./\)*,\1a/,
				s,[.-][Oo][Rr][Ii][Gg]\([	/]\),\1,
				s/[.-][Oo][Rr][Ii][Gg]$//
				s/[.]patched[.]\([^.]\)/.\1/
				h
			}
			/^+++ -/{
				g
				s/^--- a/+++ b/
				b
			}
			s,\(^+++ \)\(./\)*,\1b/,
		' "$p"
	done
	sed -i '/^patch_args=/d' $template
done
```
2021-06-20 13:17:29 +07:00

29 lines
898 B
Bash

# Template file for 'python-nose'
pkgname=python-nose
version=1.3.7
revision=6
wrksrc="nose-${version}"
build_style=python-module
pycompile_module="nose"
hostmakedepends="python-setuptools python3-setuptools"
depends="python-setuptools"
short_desc="The nicer testing for Python2"
maintainer="Orphaned <orphan@voidlinux.org>"
license="LGPL-2.1-or-later"
homepage="https://github.com/nose-devs/nose"
#changelog="https://raw.githubusercontent.com/nose-devs/nose/master/CHANGELOG"
distfiles="${PYPI_SITE}/n/nose/nose-${version}.tar.gz"
checksum=f1bffef9cbc82628f6e7d7b40d7e255aefaa1adb6a1b1d26c69a8b79e6208a98
alternatives="nose:nosetests:/usr/bin/nosetests2"
python3-nose_package() {
pycompile_module="nose"
depends="python3-setuptools"
short_desc="${short_desc/Python2/Python3}"
alternatives="nose:nosetests:/usr/bin/nosetests3"
pkg_install() {
vmove usr/bin/*3
vmove usr/lib/python3*
}
}