aboutsummaryrefslogtreecommitdiffstats
path: root/meta-python/recipes-devtools/python/python-pytest
diff options
context:
space:
mode:
authorArmin Kuster <akuster808@gmail.com>2017-10-06 09:10:13 -0700
committerMartin Jansa <Martin.Jansa@gmail.com>2017-10-15 17:29:40 +0000
commit8e1de3aa5a70f6230e23f1d2dffd9183935894ee (patch)
tree73b7576955b841db60a4e5d59b6736ebdb0c958b /meta-python/recipes-devtools/python/python-pytest
parent929a6543e617fc5cfd99069c1c390a6a15f093ce (diff)
downloadmeta-openembedded-8e1de3aa5a70f6230e23f1d2dffd9183935894ee.tar.gz
meta-openembedded-8e1de3aa5a70f6230e23f1d2dffd9183935894ee.tar.bz2
meta-openembedded-8e1de3aa5a70f6230e23f1d2dffd9183935894ee.zip
python-pytest: fix egg version of package
commit "python-pytest: remove fetch during do_compile phase" removed the ability of the package to version it self correctly. The version ended up as 0.0.0 which causes runtime version checking. This fixed that issues. Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Diffstat (limited to 'meta-python/recipes-devtools/python/python-pytest')
-rw-r--r--meta-python/recipes-devtools/python/python-pytest/pytest_version_fix.patch51
1 files changed, 51 insertions, 0 deletions
diff --git a/meta-python/recipes-devtools/python/python-pytest/pytest_version_fix.patch b/meta-python/recipes-devtools/python/python-pytest/pytest_version_fix.patch
new file mode 100644
index 000000000..908f862b5
--- /dev/null
+++ b/meta-python/recipes-devtools/python/python-pytest/pytest_version_fix.patch
@@ -0,0 +1,51 @@
+Upstream-Status: Inappropriate (OE specific)
+
+python-pytest: remove fetch during do_compile phase
+commit: c974fbf9ebf185552ab65301e07af44f36517abf
+
+introduced an issue by making the version 0.0.0
+this fixes that
+
+Signed-off-by: Armin Kuster <akuster@mvista.com>
+
+Index: pytest-3.2.2/setup.py
+===================================================================
+--- pytest-3.2.2.orig/setup.py
++++ pytest-3.2.2/setup.py
+@@ -1,5 +1,6 @@
+ import os
+ import sys
++import re
+ import setuptools
+ import pkg_resources
+ from setuptools import setup, Command
+@@ -22,6 +23,18 @@ classifiers = [
+ with open('README.rst') as fd:
+ long_description = fd.read()
+
++def read(*names, **kwargs):
++ with open(os.path.join( *names), 'r') as fp:
++ return fp.read()
++
++def find_version(*file_paths):
++ version_file = read(*file_paths)
++ version_match = re.search(r"^version = ['\']([^'\"]*)['\']",
++ version_file, re.M)
++
++ if version_match:
++ return version_match.group(1)
++ raise RuntimeError("Unable to find version string.")
+
+ def has_environment_marker_support():
+ """
+@@ -59,9 +72,7 @@ def main():
+ name='pytest',
+ description='pytest: simple powerful testing with Python',
+ long_description=long_description,
+- use_scm_version={
+- 'write_to': '_pytest/_version.py',
+- },
++ version=find_version("_pytest", "_version.py"),
+ url='http://pytest.org',
+ license='MIT license',
+ platforms=['unix', 'linux', 'osx', 'cygwin', 'win32'],