| 
									
										
										
										
											2013-03-15 14:24:13 +00:00
										 |  |  | #
 | 
					
						
							| 
									
										
										
										
											2021-10-13 12:07:13 +00:00
										 |  |  | # spec file
 | 
					
						
							| 
									
										
										
										
											2013-03-15 14:24:13 +00:00
										 |  |  | #
 | 
					
						
							| 
									
										
										
										
											2021-10-13 12:07:13 +00:00
										 |  |  | # Copyright (c) 2021 SUSE LLC
 | 
					
						
							| 
									
										
										
										
											2013-03-15 14:24:13 +00:00
										 |  |  | #
 | 
					
						
							|  |  |  | # All modifications and additions to the file contributed by third parties
 | 
					
						
							|  |  |  | # remain the property of their copyright owners, unless otherwise agreed
 | 
					
						
							|  |  |  | # upon. The license for this file, and modifications and additions to the
 | 
					
						
							|  |  |  | # file, is the same license as for the pristine package itself (unless the
 | 
					
						
							|  |  |  | # license for the pristine package is not an Open Source License, in which
 | 
					
						
							|  |  |  | # case the license is the MIT License). An "Open Source License" is a
 | 
					
						
							|  |  |  | # license that conforms to the Open Source Definition (Version 1.9)
 | 
					
						
							|  |  |  | # published by the Open Source Initiative.
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-12-04 14:16:56 +00:00
										 |  |  | # Please submit bugfixes or comments via https://bugs.opensuse.org/
 | 
					
						
							| 
									
										
										
										
											2013-03-25 08:57:57 +00:00
										 |  |  | #
 | 
					
						
							| 
									
										
										
										
											2013-03-15 14:24:13 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-08-06 21:02:48 +00:00
										 |  |  | %{?!python_module:%define python_module() python-%{**} python3-%{**}}
 | 
					
						
							| 
									
										
										
										
											2021-10-13 12:07:13 +00:00
										 |  |  | %global flavor @BUILD_FLAVOR@%{nil}
 | 
					
						
							|  |  |  | %if "%{flavor}" == "test"
 | 
					
						
							|  |  |  | %define psuffix -test
 | 
					
						
							|  |  |  | %bcond_without test
 | 
					
						
							|  |  |  | %else
 | 
					
						
							|  |  |  | %define psuffix %{nil}
 | 
					
						
							|  |  |  | %bcond_with test
 | 
					
						
							|  |  |  | %endif
 | 
					
						
							|  |  |  | Name:           python-zope.testbrowser%{psuffix}
 | 
					
						
							| 
									
										
										
										
											2020-01-21 11:37:44 +00:00
										 |  |  | Version:        5.5.1
 | 
					
						
							| 
									
										
										
										
											2013-03-15 14:24:13 +00:00
										 |  |  | Release:        0
 | 
					
						
							|  |  |  | Summary:        Programmable browser for functional black-box tests
 | 
					
						
							| 
									
										
										
										
											2013-03-25 08:57:57 +00:00
										 |  |  | License:        ZPL-2.1
 | 
					
						
							| 
									
										
										
										
											2019-07-22 11:16:50 +00:00
										 |  |  | URL:            https://github.com/zopefoundation/zope.testbrowser
 | 
					
						
							| 
									
										
										
										
											2018-08-06 21:02:48 +00:00
										 |  |  | Source:         https://files.pythonhosted.org/packages/source/z/zope.testbrowser/zope.testbrowser-%{version}.tar.gz
 | 
					
						
							| 
									
										
										
										
											2019-04-09 06:18:58 +00:00
										 |  |  | Patch0:         zope.testbrowser-remove-bad-test.patch
 | 
					
						
							| 
									
										
										
										
											2018-08-06 21:02:48 +00:00
										 |  |  | BuildRequires:  %{python_module setuptools}
 | 
					
						
							| 
									
										
										
										
											2015-05-19 07:18:23 +00:00
										 |  |  | BuildRequires:  fdupes
 | 
					
						
							| 
									
										
										
										
											2018-08-06 21:02:48 +00:00
										 |  |  | BuildRequires:  python-rpm-macros
 | 
					
						
							| 
									
										
										
										
											2019-07-22 11:16:50 +00:00
										 |  |  | Requires:       python-WSGIProxy2
 | 
					
						
							|  |  |  | Requires:       python-WebTest >= 2.0.30
 | 
					
						
							|  |  |  | Requires:       python-beautifulsoup4
 | 
					
						
							|  |  |  | Requires:       python-pytz > dev
 | 
					
						
							|  |  |  | Requires:       python-setuptools
 | 
					
						
							|  |  |  | Requires:       python-six
 | 
					
						
							|  |  |  | Requires:       python-soupsieve >= 1.9.0
 | 
					
						
							|  |  |  | Requires:       python-zope.cachedescriptors
 | 
					
						
							|  |  |  | Requires:       python-zope.interface
 | 
					
						
							|  |  |  | Requires:       python-zope.schema
 | 
					
						
							|  |  |  | Suggests:       python-mock
 | 
					
						
							|  |  |  | Suggests:       python-zope.testing
 | 
					
						
							|  |  |  | BuildArch:      noarch
 | 
					
						
							| 
									
										
										
										
											2018-08-06 21:02:48 +00:00
										 |  |  | # SECTION test requirements
 | 
					
						
							| 
									
										
										
										
											2021-10-13 12:07:13 +00:00
										 |  |  | %if %{with test}
 | 
					
						
							| 
									
										
										
										
											2018-08-06 21:02:48 +00:00
										 |  |  | BuildRequires:  %{python_module WSGIProxy2}
 | 
					
						
							| 
									
										
										
										
											2019-04-09 06:18:58 +00:00
										 |  |  | BuildRequires:  %{python_module WebTest >= 2.0.30}
 | 
					
						
							| 
									
										
										
										
											2019-07-22 11:16:50 +00:00
										 |  |  | BuildRequires:  %{python_module beautifulsoup4}
 | 
					
						
							| 
									
										
										
										
											2018-08-06 21:02:48 +00:00
										 |  |  | BuildRequires:  %{python_module pytz > dev}
 | 
					
						
							|  |  |  | BuildRequires:  %{python_module setuptools}
 | 
					
						
							|  |  |  | BuildRequires:  %{python_module six}
 | 
					
						
							| 
									
										
										
										
											2019-07-22 11:16:50 +00:00
										 |  |  | BuildRequires:  %{python_module soupsieve >= 1.9.0}
 | 
					
						
							| 
									
										
										
										
											2018-08-06 21:02:48 +00:00
										 |  |  | BuildRequires:  %{python_module zope.cachedescriptors}
 | 
					
						
							|  |  |  | BuildRequires:  %{python_module zope.interface}
 | 
					
						
							|  |  |  | BuildRequires:  %{python_module zope.schema}
 | 
					
						
							| 
									
										
										
										
											2021-10-13 12:07:13 +00:00
										 |  |  | BuildRequires:  %{python_module zope.testbrowser}
 | 
					
						
							| 
									
										
										
										
											2018-08-06 21:02:48 +00:00
										 |  |  | BuildRequires:  %{python_module zope.testing}
 | 
					
						
							| 
									
										
										
										
											2021-10-13 12:07:13 +00:00
										 |  |  | %endif
 | 
					
						
							| 
									
										
										
										
											2018-08-06 21:02:48 +00:00
										 |  |  | # /SECTION
 | 
					
						
							|  |  |  | %python_subpackages
 | 
					
						
							| 
									
										
										
										
											2013-03-15 14:24:13 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  | %description
 | 
					
						
							| 
									
										
										
										
											2018-08-06 21:02:48 +00:00
										 |  |  | The zope.testbrowser package provides an programmable web browser
 | 
					
						
							| 
									
										
										
										
											2013-03-15 14:24:13 +00:00
										 |  |  | with special focus on testing.  It is used in Zope, but it's not Zope
 | 
					
						
							| 
									
										
										
										
											2018-08-06 21:02:48 +00:00
										 |  |  | specific.  It can be used to test or otherwise interact with any web
 | 
					
						
							|  |  |  | site.
 | 
					
						
							| 
									
										
										
										
											2013-03-15 14:24:13 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  | %prep
 | 
					
						
							|  |  |  | %setup -q -n zope.testbrowser-%{version}
 | 
					
						
							| 
									
										
										
										
											2019-04-09 06:18:58 +00:00
										 |  |  | %patch0 -p1
 | 
					
						
							| 
									
										
										
										
											2013-03-15 14:24:13 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  | %build
 | 
					
						
							| 
									
										
										
										
											2021-10-13 12:07:13 +00:00
										 |  |  | %if !%{with test}
 | 
					
						
							|  |  |  | sed -i 's:import mock:import unittest.mock as mock:' src/zope/testbrowser/tests/test_wsgi.py
 | 
					
						
							| 
									
										
										
										
											2018-08-06 21:02:48 +00:00
										 |  |  | %python_build
 | 
					
						
							| 
									
										
										
										
											2021-10-13 12:07:13 +00:00
										 |  |  | %endif
 | 
					
						
							| 
									
										
										
										
											2013-03-15 14:24:13 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  | %install
 | 
					
						
							| 
									
										
										
										
											2021-10-13 12:07:13 +00:00
										 |  |  | %if !%{with test}
 | 
					
						
							| 
									
										
										
										
											2018-08-06 21:02:48 +00:00
										 |  |  | %python_install
 | 
					
						
							|  |  |  | %python_expand %fdupes %{buildroot}%{$python_sitelib}
 | 
					
						
							| 
									
										
										
										
											2021-10-13 12:07:13 +00:00
										 |  |  | %endif
 | 
					
						
							| 
									
										
										
										
											2013-03-15 14:24:13 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-04-09 06:18:58 +00:00
										 |  |  | %check
 | 
					
						
							| 
									
										
										
										
											2021-10-13 12:07:13 +00:00
										 |  |  | %if %{with test}
 | 
					
						
							|  |  |  | cd src
 | 
					
						
							| 
									
										
										
										
											2021-10-13 12:10:22 +00:00
										 |  |  | %pyunittest -v zope/testbrowser/tests/test_*.py
 | 
					
						
							| 
									
										
										
										
											2021-10-13 12:07:13 +00:00
										 |  |  | # TODO doctests
 | 
					
						
							|  |  |  | %endif
 | 
					
						
							| 
									
										
										
										
											2019-04-09 06:18:58 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-08-06 21:02:48 +00:00
										 |  |  | %files %{python_files}
 | 
					
						
							| 
									
										
										
										
											2021-10-13 12:07:13 +00:00
										 |  |  | %if !%{with test}
 | 
					
						
							| 
									
										
										
										
											2018-08-06 21:02:48 +00:00
										 |  |  | %doc CHANGES.rst README.rst
 | 
					
						
							|  |  |  | %license LICENSE.rst
 | 
					
						
							| 
									
										
										
										
											2013-03-15 14:24:13 +00:00
										 |  |  | %{python_sitelib}/*
 | 
					
						
							| 
									
										
										
										
											2021-10-13 12:07:13 +00:00
										 |  |  | %endif
 | 
					
						
							| 
									
										
										
										
											2013-03-15 14:24:13 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  | %changelog
 |