2017-10-03 14:11:02 +00:00
#
# spec file for package python-kitchen
#
2022-03-21 21:14:42 +00:00
# Copyright (c) 2022 SUSE LLC
2017-10-03 14:11:02 +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 13:37:14 +00:00
# Please submit bugfixes or comments via https://bugs.opensuse.org/
2018-02-07 07:27:04 +00:00
#
2017-10-03 14:11:02 +00:00
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name : python-kitchen
2019-07-24 08:33:26 +00:00
Version : 1.2.6
2017-10-03 14:11:02 +00:00
Release : 0
Summary : Kitchen contains a cornucopia of useful code
2018-08-29 12:47:50 +00:00
License : LGPL-2.1-or-later
2017-10-03 14:11:02 +00:00
Group : Development/Languages/Python
2020-09-09 13:09:00 +00:00
URL : https://github.com/fedora-infra/kitchen/
2017-10-03 14:11:02 +00:00
Source : https://files.pythonhosted.org/packages/source/k/kitchen/kitchen-%{version} .tar.gz
2020-09-09 13:09:00 +00:00
# https://github.com/fedora-infra/kitchen/pull/33
Patch0 : python-kitchen-remove-nose.patch
2017-10-03 14:11:02 +00:00
BuildRequires : %{python_module setuptools}
BuildRequires : fdupes
2018-02-07 07:27:04 +00:00
BuildRequires : python-rpm-macros
2017-10-03 14:11:02 +00:00
BuildArch : noarch
2018-08-29 12:47:50 +00:00
# SECTION tests
2020-09-09 13:09:00 +00:00
BuildRequires : %{python_module pytest}
2018-08-29 12:47:50 +00:00
# /SECTION
2017-10-03 14:11:02 +00:00
%python_subpackages
%description
2018-02-07 07:27:04 +00:00
A bunch of useful python functions to be used in other projects.
2017-10-03 14:11:02 +00:00
%prep
%setup -q -n kitchen-%{version}
2020-09-09 13:09:00 +00:00
%patch0 -p1
2018-02-07 07:27:04 +00:00
sed -i '1s/^#!.*//' kitchen2/kitchen/pycompat24/base64/_base64.py
2017-10-03 14:11:02 +00:00
%build
%python_build
%install
%python_install
%python_expand %fdupes %{buildroot} %{$python_sitelib}
2018-02-07 07:27:04 +00:00
2017-10-03 14:11:02 +00:00
%check
2018-08-29 12:47:50 +00:00
export LANG='en_US.UTF8'
2018-02-07 07:27:04 +00:00
%{python_expand # run test
2021-01-19 07:34:47 +00:00
%if "$python" == "python2"
2018-02-07 07:27:04 +00:00
pushd kitchen2
%else
pushd kitchen3
2017-10-03 14:11:02 +00:00
%endif
2022-03-21 21:14:42 +00:00
# skips because of gh#fedora-infra/kitchen#29 and gh#fedora-infra/kitchen#37
$python -m pytest -k 'not (test_internal_generate_combining_table or test_easy_gettext_setup_non_unicode or test_invalid_fallback_no_raise or test_lgettext or test_lngettext)'
2018-02-07 07:27:04 +00:00
popd}
2017-10-03 14:11:02 +00:00
%files %{python_files}
2018-08-29 12:47:50 +00:00
%license COPYING COPYING.LESSER
%doc NEWS.rst README.rst
2017-10-03 14:11:02 +00:00
%{python_sitelib} /*
%changelog