summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorPavel Merzlyakov2017-02-05 03:44:42 +0200
committerPavel Merzlyakov2017-02-05 03:44:42 +0200
commit0a8da538cedf1b2bdcfe6e87eb68f6d10e1e5949 (patch)
treea782f917b3a7db5a84d2337c137c0cbfa5bdcabd
parentc072630d946c51d1555d4b0d85ac3e8d839a1673 (diff)
downloadaur-0a8da538cedf1b2bdcfe6e87eb68f6d10e1e5949.tar.gz
Fix for python2-pytest-3
-rw-r--r--.SRCINFO2
-rw-r--r--PKGBUILD5
-rw-r--r--fix001.diff33
3 files changed, 38 insertions, 2 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 2814b0ad0130..252431d717e9 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -10,7 +10,9 @@ pkgbase = python-pytest-allure
depends = python-six
depends = python-namedlist
source = https://pypi.python.org/packages/79/34/7fee1e62f5d99b58f1a6b4b23f0d99caa3e1294fdfa4672c6e6ec9e25b15/pytest-allure-adaptor-1.7.6.tar.gz
+ source = fix001.diff
md5sums = 67d5cdb1c2ea53c227c876dec2f287ab
+ md5sums = 3043cd64176a904888d950871984deb9
pkgname = python-pytest-allure
diff --git a/PKGBUILD b/PKGBUILD
index 49ebd6d1d92b..87a57dfbc184 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -9,10 +9,11 @@ pkgdesc='Plugin for py.test to generate allure xml reports'
arch=('i686' 'x86_64')
url='https://pypi.python.org/pypi/pytest-allure-adaptor'
depends=('python-pytest' 'python-lxml' 'python-six' 'python-namedlist')
-source=("https://pypi.python.org/packages/79/34/7fee1e62f5d99b58f1a6b4b23f0d99caa3e1294fdfa4672c6e6ec9e25b15/${_pkgname}-$pkgver.tar.gz")
-md5sums=('67d5cdb1c2ea53c227c876dec2f287ab')
+source=("https://pypi.python.org/packages/79/34/7fee1e62f5d99b58f1a6b4b23f0d99caa3e1294fdfa4672c6e6ec9e25b15/${_pkgname}-$pkgver.tar.gz" "fix001.diff")
+md5sums=('67d5cdb1c2ea53c227c876dec2f287ab' '3043cd64176a904888d950871984deb9')
package() {
cd "$srcdir/$_pkgname-$pkgver"
+ patch -p0 -i ../fix001.diff
python setup.py install --prefix=/usr --root="$pkgdir"
}
diff --git a/fix001.diff b/fix001.diff
new file mode 100644
index 000000000000..b6c5432e42fe
--- /dev/null
+++ b/fix001.diff
@@ -0,0 +1,33 @@
+--- ./allure/pytest_plugin.py 2016-11-21 16:21:21.000000000 +0200
++++ ./allure/pytest_plugin.py 2017-02-04 20:00:11.209182287 +0200
+@@ -4,7 +4,7 @@
+ import argparse
+
+ from collections import namedtuple
+-from _pytest.junitxml import mangle_testnames
++#from _pytest.junitxml import mangle_testnames
+ from six import text_type
+
+ from allure.common import AllureImpl, StepContext
+@@ -14,6 +14,10 @@
+ all_of, get_exception_message, now
+ from allure.structure import TestCase, TestStep, Attach, TestSuite, Failure, TestLabel
+
++def mangle_testnames(names):
++ names = [x.replace(".py", "") for x in names if x != '()']
++ names[0] = names[0].replace("/", '.')
++ return names
+
+ def pytest_addoption(parser):
+ parser.getgroup("reporting").addoption('--alluredir',
+--- ./setup.py 2016-11-21 16:21:21.000000000 +0200
++++ ./setup.py 2017-02-05 00:28:16.000000000 +0200
+@@ -7,7 +7,7 @@
+
+ install_requires = [
+ "lxml>=3.2.0",
+- "pytest>=2.7.3,<=2.9.0",
++ "pytest>=2.7.3",
+ "namedlist",
+ "six>=1.9.0"
+ ]