2013-08-08 11:22:41 +00:00
|
|
|
#
|
|
|
|
|
# spec file for package python-ZConfig
|
|
|
|
|
#
|
2021-07-12 09:29:04 +00:00
|
|
|
# Copyright (c) 2021 SUSE LLC
|
2013-08-08 11:22:41 +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.
|
|
|
|
|
|
2019-03-04 12:32:47 +00:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2013-08-08 11:22:41 +00:00
|
|
|
#
|
|
|
|
|
|
|
|
|
|
|
2017-06-29 08:41:57 +00:00
|
|
|
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
2013-08-08 11:22:41 +00:00
|
|
|
Name: python-ZConfig
|
2021-07-12 09:29:04 +00:00
|
|
|
Version: 3.6.0
|
2013-08-08 11:22:41 +00:00
|
|
|
Release: 0
|
|
|
|
|
Summary: Structured Configuration Library
|
|
|
|
|
License: ZPL-2.1
|
|
|
|
|
Group: Development/Libraries/Python
|
2019-03-04 12:32:47 +00:00
|
|
|
URL: https://github.com/zopefoundation/ZConfig
|
2017-06-29 08:41:57 +00:00
|
|
|
Source: https://files.pythonhosted.org/packages/source/Z/ZConfig/ZConfig-%{version}.tar.gz
|
2013-08-08 11:22:41 +00:00
|
|
|
# Testing requirements:
|
2017-06-29 08:41:57 +00:00
|
|
|
BuildRequires: %{python_module docutils}
|
|
|
|
|
BuildRequires: %{python_module manuel}
|
2019-03-04 12:32:47 +00:00
|
|
|
BuildRequires: %{python_module setuptools}
|
2017-06-29 08:41:57 +00:00
|
|
|
BuildRequires: %{python_module zope.testrunner}
|
|
|
|
|
BuildRequires: fdupes
|
|
|
|
|
BuildRequires: python-rpm-macros
|
2019-07-29 16:17:44 +00:00
|
|
|
Requires: python-setuptools
|
2017-06-29 08:41:57 +00:00
|
|
|
Requires(post): update-alternatives
|
2021-07-12 09:29:04 +00:00
|
|
|
Requires(postun):update-alternatives
|
2013-08-08 11:22:41 +00:00
|
|
|
BuildArch: noarch
|
2017-06-29 08:41:57 +00:00
|
|
|
%python_subpackages
|
2013-08-08 11:22:41 +00:00
|
|
|
|
|
|
|
|
%description
|
|
|
|
|
ZConfig is a configuration library intended for general use. It supports a
|
|
|
|
|
hierarchical schema-driven configuration model that allows a schema to specify
|
|
|
|
|
data conversion routines written in Python. ZConfig's model is very different
|
|
|
|
|
from the model supported by the ConfigParser module found in Python's standard
|
|
|
|
|
library, and is more suitable to configuration-intensive applications.
|
|
|
|
|
|
|
|
|
|
ZConfig schema are written in an XML-based language and are able to "import"
|
|
|
|
|
schema components provided by Python packages. Since components are able to
|
|
|
|
|
bind to conversion functions provided by Python code in the package (or
|
|
|
|
|
elsewhere), configuration objects can be arbitrarily complex, with values that
|
|
|
|
|
have been verified against arbitrary constraints. This makes it easy for
|
|
|
|
|
applications to separate configuration support from configuration loading even
|
|
|
|
|
with configuration data being defined and consumed by a wide range of separate
|
|
|
|
|
packages.
|
|
|
|
|
|
2017-06-29 08:41:57 +00:00
|
|
|
%package doc
|
2013-08-08 11:22:41 +00:00
|
|
|
Summary: Structured Configuration Library
|
|
|
|
|
Group: Development/Libraries/Python
|
|
|
|
|
Requires: %{name} = %{version}
|
|
|
|
|
|
2017-06-29 08:41:57 +00:00
|
|
|
%description doc
|
2013-08-08 11:22:41 +00:00
|
|
|
This package contains documentation files for %{name}.
|
|
|
|
|
|
|
|
|
|
%prep
|
|
|
|
|
%setup -q -n ZConfig-%{version}
|
2017-06-29 08:41:57 +00:00
|
|
|
rm -rf ZConfig.egg-info
|
|
|
|
|
rm doc/make.bat
|
2019-03-04 12:32:47 +00:00
|
|
|
# test works only in git repo
|
|
|
|
|
rm -f ZConfig/tests/test_readme.py
|
2013-08-08 11:22:41 +00:00
|
|
|
|
|
|
|
|
%build
|
2017-06-29 08:41:57 +00:00
|
|
|
%python_build
|
2013-08-08 11:22:41 +00:00
|
|
|
|
|
|
|
|
%install
|
2017-06-29 08:41:57 +00:00
|
|
|
%python_install
|
2019-03-04 12:32:47 +00:00
|
|
|
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
2017-06-29 08:41:57 +00:00
|
|
|
%python_clone -a %{buildroot}%{_bindir}/zconfig
|
|
|
|
|
%python_clone -a %{buildroot}%{_bindir}/zconfig_schema2html
|
2013-08-08 11:22:41 +00:00
|
|
|
|
|
|
|
|
%check
|
2019-03-04 12:32:47 +00:00
|
|
|
export LANG=en_US.UTF8
|
2019-07-29 16:17:44 +00:00
|
|
|
%python_expand PYTHONPATH=%{buildroot}%{$python_sitelib} zope-testrunner-%{$python_bin_suffix} -v --test-path=.
|
2013-08-08 11:22:41 +00:00
|
|
|
|
2014-04-16 20:51:19 +00:00
|
|
|
%post
|
2017-06-29 08:41:57 +00:00
|
|
|
%python_install_alternative zconfig zconfig_schema2html
|
2014-04-16 20:51:19 +00:00
|
|
|
|
|
|
|
|
%preun
|
2017-06-29 08:41:57 +00:00
|
|
|
%python_uninstall_alternative zconfig
|
2014-04-16 20:51:19 +00:00
|
|
|
|
2017-06-29 08:41:57 +00:00
|
|
|
%files %{python_files}
|
2019-03-04 12:32:47 +00:00
|
|
|
%license LICENSE.txt
|
|
|
|
|
%doc CHANGES.rst COPYRIGHT.txt PKG-INFO README.rst
|
2017-06-29 08:41:57 +00:00
|
|
|
%python_alternative %{_bindir}/zconfig
|
|
|
|
|
%python_alternative %{_bindir}/zconfig_schema2html
|
2013-08-08 11:22:41 +00:00
|
|
|
%{python_sitelib}/*
|
2017-06-29 08:41:57 +00:00
|
|
|
|
|
|
|
|
%files %{python_files doc}
|
2013-08-08 11:22:41 +00:00
|
|
|
%doc doc/
|
|
|
|
|
|
|
|
|
|
%changelog
|