diff --git a/srcpkgs/python3-ansiwrap/template b/srcpkgs/python3-ansiwrap/template new file mode 100644 index 0000000000..8d1108fa13 --- /dev/null +++ b/srcpkgs/python3-ansiwrap/template @@ -0,0 +1,20 @@ +# Template file for 'python3-ansiwrap' +pkgname=python3-ansiwrap +version=0.8.4 +revision=1 +wrksrc=${pkgname#*-}-${version} +build_style=python3-module +hostmakedepends="python3-setuptools" +short_desc="Textwrap, but savvy to ANSI colors" +maintainer="travankor " +license="Apache-2.0" +homepage="https://pypi.org/project/ansiwrap/" +distfiles="${PYPI_SITE}/a/ansiwrap/ansiwrap-${version}.zip" +checksum=ca0c740734cde59bf919f8ff2c386f74f9a369818cdc60efe94893d01ea8d9b7 + +pre_build() { + # Use python 3.6+'s built in version of textwrap, not a random library + vsed -i '/textwrap3/d' setup.py + vsed -i '0,/a_textwrap.*/s//import textwrap/' ansiwrap/core.py + vsed -i 's/a_textwrap/textwrap/' ansiwrap/core.py +}