From 6edb7c3d11d9e4bc00c1caedeeeef895edccfc47 Mon Sep 17 00:00:00 2001 From: Alessio Sergi Date: Mon, 28 May 2018 19:20:37 +0200 Subject: [PATCH] python-pytest-mock: fix pycompile_module Fix depends for Python2 flavor. See https://github.com/pytest-dev/pytest-mock/commit/83a4a913429affa2597d0e4d50e9117fa3d93c88. --- srcpkgs/python-pytest-mock/template | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/srcpkgs/python-pytest-mock/template b/srcpkgs/python-pytest-mock/template index 89b4cbb6a80..5ed0029d9ae 100644 --- a/srcpkgs/python-pytest-mock/template +++ b/srcpkgs/python-pytest-mock/template @@ -1,28 +1,34 @@ # Template file for 'python-pytest-mock' pkgname=python-pytest-mock version=1.7.1 -revision=1 +revision=2 +noarch=yes wrksrc="${pkgname/python-//}-${version}" build_style=python-module -pycompile_module="pytest_mock" +pycompile_module="pytest_mock.py _pytest_mock_version.py" hostmakedepends="python-setuptools python3-setuptools" -depends="python-pytest" -short_desc="Thin-wrapper around the mock package for easier use with py.test" +depends="python-pytest python-mock" +short_desc="Thin-wrapper around mock for easier use with py.test (Python2)" maintainer="maxice8 " license="MIT" homepage="https://github.com/pytest-dev/pytest-mock/" distfiles="${PYPI_SITE}/p/pytest-mock/pytest-mock-${version}.tar.gz" checksum=b879dff61e31fcd4727c227c182f15f222a155293cc64ed5a02d55e0020cf949 -noarch=yes +pre_build() { + sed -i setup.py \ + -e '/setup_requires=/d' \ + -e "s|use_scm_version=.*|version='${version}',|" +} post_install() { vlicense LICENSE } python3-pytest-mock_package() { noarch=yes - pycompile_module="pytest_mock" depends="python3-pytest" + pycompile_module="pytest_mock.py _pytest_mock_version.py" + short_desc="${short_desc/Python2/Python3}" pkg_install() { vmove usr/lib/python3* vlicense LICENSE