From 74d29eb2cd8610e1b6e3ec62ae02186583055a09 Mon Sep 17 00:00:00 2001 From: Alessio Sergi Date: Thu, 19 Feb 2015 10:17:00 +0100 Subject: [PATCH] New package: python-jsonschema-2.4.0 --- srcpkgs/python-jsonschema/template | 54 ++++++++++++++++++++++++++++++ srcpkgs/python3.4-jsonschema | 1 + 2 files changed, 55 insertions(+) create mode 100644 srcpkgs/python-jsonschema/template create mode 120000 srcpkgs/python3.4-jsonschema diff --git a/srcpkgs/python-jsonschema/template b/srcpkgs/python-jsonschema/template new file mode 100644 index 00000000000..d9f2fb6062f --- /dev/null +++ b/srcpkgs/python-jsonschema/template @@ -0,0 +1,54 @@ +# Template file for 'python-jsonschema' +pkgname=python-jsonschema +version=2.4.0 +revision=1 +noarch=yes +wrksrc="jsonschema-${version}" +python_versions="2.7 3.4" +hostmakedepends="python-setuptools python3.4-setuptools" +depends="python-setuptools" +pycompile_module="jsonschema" +short_desc="Implementation of JSON Schema for Python2" +maintainer="Alessio Sergi " +homepage="https://github.com/Julian/jsonschema" +license="MIT" +distfiles="${PYPI_SITE}/j/jsonschema/jsonschema-${version}.tar.gz" +checksum=1298a2f1b2f4c4a7b921cccd159e4e42f6d7b0fb75c86c0cdecfc71f061833fa + +post_extract() { + cp -a ${wrksrc} /tmp/jsonschema-2.7 + cp -a ${wrksrc} /tmp/jsonschema-3.4 + mv /tmp/jsonschema-{2.7,3.4} ${wrksrc} +} +pre_build() { + cd ${wrksrc}/jsonschema-3.4 + sed -i 's,\(jsonschema\) =,\13 =,' setup.py +} +do_build() { + cd ${wrksrc}/jsonschema-2.7 + python setup.py build + + cd ${wrksrc}/jsonschema-3.4 + python3.4 setup.py build +} +do_install() { + cd ${wrksrc}/jsonschema-2.7 + python setup.py install --root=${DESTDIR} + vlicense COPYING + + cd ${wrksrc}/jsonschema-3.4 + python3.4 setup.py install --root=${DESTDIR} +} + +python3.4-jsonschema_package() { + noarch=yes + depends="python3.4-setuptools" + pycompile_version="3.4" + pycompile_module="jsonschema" + short_desc="${short_desc/Python2/Python3.4}" + pkg_install() { + vmove usr/bin/jsonschema3 + vmove usr/lib/python3.4 + vlicense ${wrksrc}/COPYING + } +} diff --git a/srcpkgs/python3.4-jsonschema b/srcpkgs/python3.4-jsonschema new file mode 120000 index 00000000000..7eeab716dba --- /dev/null +++ b/srcpkgs/python3.4-jsonschema @@ -0,0 +1 @@ +python-jsonschema \ No newline at end of file