[packages/python-pytest-flake8] - new
qboosh
qboosh at pld-linux.org
Tue Apr 18 20:33:14 CEST 2017
commit 9debd1ef71d94b3abf367853a1a4bc3c86f09a10
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date: Tue Apr 18 20:33:20 2017 +0200
- new
python-pytest-flake8-tests.patch | 12 +++++
python-pytest-flake8.spec | 107 +++++++++++++++++++++++++++++++++++++++
2 files changed, 119 insertions(+)
---
diff --git a/python-pytest-flake8.spec b/python-pytest-flake8.spec
new file mode 100644
index 0000000..4e0e7f9
--- /dev/null
+++ b/python-pytest-flake8.spec
@@ -0,0 +1,107 @@
+#
+# Conditional build:
+%bcond_without tests # py.test tests
+%bcond_without python2 # CPython 2.x module
+%bcond_without python3 # CPython 3.x module
+
+Summary: py.test plugin to check FLAKE8 requirements
+Summary(pl.UTF-8): Wtyczka py.test do sprawdzania wymagań FLAKE8
+Name: python-pytest-flake8
+Version: 0.8.1
+Release: 1
+License: BSD
+Group: Libraries/Python
+#Source0Download: https://pypi.python.org/simple/pytest-flake8/
+Source0: https://files.pythonhosted.org/packages/source/p/pytest-flake8/pytest-flake8-%{version}.tar.gz
+# Source0-md5: 39b64ebceb2849805975a2ff4ea7e947
+Patch0: %{name}-tests.patch
+URL: https://github.com/tholo/pytest-flake8
+%if %{with python2}
+BuildRequires: python-modules >= 1:2.7
+BuildRequires: python-setuptools
+%if %{with tests}
+BuildRequires: python-flake8 >= 3.0
+BuildRequires: python-pytest >= 2.8
+%endif
+%endif
+%if %{with python3}
+BuildRequires: python3-modules >= 1:3.4
+BuildRequires: python3-setuptools
+%if %{with tests}
+BuildRequires: python3-flake8 >= 3.0
+BuildRequires: python3-pytest >= 2.8
+%endif
+%endif
+BuildRequires: rpm-pythonprov
+BuildRequires: rpmbuild(macros) >= 1.714
+Requires: python-modules >= 1:2.7
+BuildArch: noarch
+BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%description
+py.test plugin for efficiently checking PEP8 compliance.
+
+%description -l pl.UTF-8
+Wtyczka py.test do efektywnego sprawdzania zgodności z PEP8.
+
+%package -n python3-pytest-flake8
+Summary: py.test plugin to check FLAKE8 requirements
+Summary(pl.UTF-8): Wtyczka py.test do sprawdzania wymagań FLAKE8
+Group: Libraries/Python
+Requires: python3-modules >= 1:3.4
+
+%description -n python3-pytest-flake8
+py.test plugin for efficiently checking PEP8 compliance.
+
+%description -n python3-pytest-flake8 -l pl.UTF-8
+Wtyczka py.test do efektywnego sprawdzania zgodności z PEP8.
+
+%prep
+%setup -q -n pytest-flake8-%{version}
+%patch0 -p1
+
+%build
+%if %{with python2}
+%py_build
+
+%{?with_tests:PYTHONPATH=$(pwd) %{__python} -m pytest}
+%endif
+
+%if %{with python3}
+%py3_build
+
+%{?with_tests:PYTHONPATH=$(pwd) %{__python3} -m pytest}
+%endif
+
+%install
+rm -rf $RPM_BUILD_ROOT
+
+%if %{with python2}
+%py_install
+
+%py_postclean
+%endif
+
+%if %{with python3}
+%py3_install
+%endif
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%if %{with python2}
+%files
+%defattr(644,root,root,755)
+%doc CHANGELOG LICENSE README.rst
+%{py_sitescriptdir}/pytest_flake8.py[co]
+%{py_sitescriptdir}/pytest_flake8-%{version}-py*.egg-info
+%endif
+
+%if %{with python3}
+%files -n python3-pytest-flake8
+%defattr(644,root,root,755)
+%doc CHANGELOG LICENSE README.rst
+%{py3_sitescriptdir}/pytest_flake8.py
+%{py3_sitescriptdir}/__pycache__/pytest_flake8.cpython-*.py[co]
+%{py3_sitescriptdir}/pytest_flake8-%{version}-py*.egg-info
+%endif
diff --git a/python-pytest-flake8-tests.patch b/python-pytest-flake8-tests.patch
new file mode 100644
index 0000000..b8b347e
--- /dev/null
+++ b/python-pytest-flake8-tests.patch
@@ -0,0 +1,12 @@
+--- pytest-flake8-0.8.1/test_flake8.py.orig 2017-04-18 20:13:18.303577852 +0200
++++ pytest-flake8-0.8.1/test_flake8.py 2017-04-18 20:14:15.383577200 +0200
+@@ -128,7 +128,8 @@
+ "*E201*",
+ "*1 failed*",
+ ])
+- assert 'passed' not in result.stdout.str()
++ # false positive in debug log for registering --stdin-display-name option
++ # assert 'passed' not in result.stdout.str()
+
+
+ @pytest.mark.xfail("sys.platform == 'win32'")
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/python-pytest-flake8.git/commitdiff/9debd1ef71d94b3abf367853a1a4bc3c86f09a10
More information about the pld-cvs-commit
mailing list