82 lines
2.3 KiB
RPMSpec
82 lines
2.3 KiB
RPMSpec
|
#
|
||
|
# spec file for package python-iniconfig
|
||
|
#
|
||
|
# Copyright (c) 2020 SUSE LLC
|
||
|
#
|
||
|
# 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.
|
||
|
|
||
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
||
|
#
|
||
|
|
||
|
|
||
|
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
||
|
%global flavor @BUILD_FLAVOR@%{nil}
|
||
|
%if "%{flavor}" == "test"
|
||
|
%define psuffix -%{flavor}
|
||
|
%bcond_without test
|
||
|
%else
|
||
|
%define psuffix %{nil}
|
||
|
%bcond_with test
|
||
|
%endif
|
||
|
Name: python-iniconfig%{psuffix}
|
||
|
Version: 1.0.1
|
||
|
Release: 0
|
||
|
Summary: iniconfig: brain-dead simple config-ini parsing
|
||
|
License: MIT
|
||
|
Group: Development/Languages/Python
|
||
|
URL: https://github.com/RonnyPfannschmidt/iniconfig
|
||
|
Source: https://files.pythonhosted.org/packages/source/i/iniconfig/iniconfig-%{version}.tar.gz
|
||
|
BuildRequires: %{python_module setuptools}
|
||
|
BuildRequires: fdupes
|
||
|
BuildRequires: python-rpm-macros
|
||
|
BuildArch: noarch
|
||
|
%if %{with test}
|
||
|
BuildRequires: %{python_module pytest}
|
||
|
%endif
|
||
|
%python_subpackages
|
||
|
|
||
|
%description
|
||
|
iniconfig is a small and simple INI-file parser module
|
||
|
having a unique set of features:
|
||
|
|
||
|
* tested against Python2.4 across to Python3.2, Jython, PyPy
|
||
|
* maintains order of sections and entries
|
||
|
* supports multi-line values with or without line-continuations
|
||
|
* supports "#" comments everywhere
|
||
|
* raises errors with proper line-numbers
|
||
|
* no bells and whistles like automatic substitutions
|
||
|
* iniconfig raises an Error if two sections have the same name.
|
||
|
|
||
|
%prep
|
||
|
%setup -q -n iniconfig-%{version}
|
||
|
|
||
|
%build
|
||
|
%python_build
|
||
|
|
||
|
%install
|
||
|
%if !%{with test}
|
||
|
%python_install
|
||
|
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
||
|
%endif
|
||
|
|
||
|
%check
|
||
|
%if %{with test}
|
||
|
%pytest
|
||
|
%endif
|
||
|
|
||
|
%if !%{with test}
|
||
|
%files %{python_files}
|
||
|
%license LICENSE
|
||
|
%doc README.txt
|
||
|
%{python_sitelib}/*
|
||
|
%endif
|
||
|
|
||
|
%changelog
|