2019-02-13 10:57:31 +01:00
|
|
|
#
|
|
|
|
# spec file for package python-fields
|
|
|
|
#
|
2023-04-21 16:40:06 +02:00
|
|
|
# Copyright (c) 2023 SUSE LLC
|
2019-02-13 10:57:31 +01: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.
|
|
|
|
|
2019-02-13 11:05:43 +01:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2019-02-13 10:57:31 +01:00
|
|
|
#
|
|
|
|
|
|
|
|
|
|
|
|
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
2023-04-21 16:40:06 +02:00
|
|
|
%{?sle15_python_module_pythons}
|
2019-02-13 10:57:31 +01:00
|
|
|
Name: python-fields
|
|
|
|
Version: 5.0.0
|
|
|
|
Release: 0
|
|
|
|
Summary: Container class boilerplate killer
|
|
|
|
License: BSD-2-Clause
|
|
|
|
Group: Development/Languages/Python
|
2019-02-13 11:05:43 +01:00
|
|
|
URL: https://github.com/ionelmc/python-fields
|
2019-02-13 10:57:31 +01:00
|
|
|
Source: https://files.pythonhosted.org/packages/source/f/fields/fields-%{version}.tar.gz
|
|
|
|
BuildRequires: %{python_module pytest}
|
2019-02-13 11:05:43 +01:00
|
|
|
BuildRequires: %{python_module setuptools}
|
|
|
|
BuildRequires: fdupes
|
|
|
|
BuildRequires: python-rpm-macros
|
2019-02-13 10:57:31 +01:00
|
|
|
BuildArch: noarch
|
|
|
|
%python_subpackages
|
|
|
|
|
|
|
|
%description
|
|
|
|
Container class boilerplate killer.
|
|
|
|
Features:
|
2019-02-13 11:05:43 +01:00
|
|
|
* Human-readable ``__repr__``
|
|
|
|
* Complete set of comparison methods
|
|
|
|
* Keyword and positional argument support. Works like a normal class - you can override just about anything in the
|
|
|
|
subclass (eg: a custom ``__init__``). In contrast, `hynek/characteristic <https://github.com/hynek/characteristic>`_
|
|
|
|
forces different call schematics and calls your ``__init__`` with different arguments.
|
2019-02-13 10:57:31 +01:00
|
|
|
|
|
|
|
%prep
|
|
|
|
%setup -q -n fields-%{version}
|
2019-03-28 16:33:41 +01:00
|
|
|
# do not do benchmark tests, in virtual they don't make much sense and we
|
|
|
|
# avoid cycle with pytest-benchmark
|
|
|
|
sed -i -e '/--benchmark-disable/d' setup.cfg
|
2019-07-19 10:56:11 +02:00
|
|
|
# do not run doctests, needless dependencies pulled in that way
|
|
|
|
sed -i -e '/doctest/d' setup.cfg
|
|
|
|
sed -i -e 's/\[pytest\]/\[tools:pytest\]/g' setup.cfg
|
2019-03-28 16:33:41 +01:00
|
|
|
rm tests/test_perf.py
|
2019-02-13 10:57:31 +01:00
|
|
|
|
|
|
|
%build
|
|
|
|
%python_build
|
|
|
|
|
|
|
|
%install
|
|
|
|
%python_install
|
|
|
|
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
|
|
|
|
|
|
|
%check
|
2019-03-28 16:33:41 +01:00
|
|
|
%pytest
|
2019-02-13 10:57:31 +01:00
|
|
|
|
|
|
|
%files %{python_files}
|
2019-02-13 11:05:43 +01:00
|
|
|
%license LICENSE
|
|
|
|
%doc AUTHORS.rst CHANGELOG.rst README.rst
|
2019-02-13 10:57:31 +01:00
|
|
|
%{python_sitelib}/*
|
|
|
|
|
|
|
|
%changelog
|