it seems we do need to support duplicated sections, see also
e2df002c22c6542746978d7f15a088a81cf82758, and
ConfigParser.RawConfigParser from python2 does not offer `strict`
parameter, so we have to use configparser as an alternative. otherwise,
`ceph_deploy/tests/test_conf.py::test_section_repeat` always fails
Signed-off-by: Kefu Chai <kchai@redhat.com>
%endif
BuildRequires: git
Requires: python-argparse
+Requires: python-configparser
Requires: python-remoto
%if 0%{?suse_version} && 0%{?suse_version} <= 1110
%{!?python_sitelib: %global python_sitelib %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
-try:
- import configparser
-except ImportError:
- import ConfigParser as configparser
+import configparser
import contextlib
import sys
class CephConf(configparser.RawConfigParser):
def __init__(self, *args, **kwargs):
- if sys.version_info >= (3, 2):
- kwargs.setdefault('strict', False)
+ kwargs.setdefault('strict', False)
# super() cannot be used with an old-style class
configparser.RawConfigParser.__init__(self, *args, **kwargs)
Architecture: all
Depends: python,
python-argparse,
+ python-configparser
python-setuptools,
python-remoto,
${misc:Depends},
pyversion = sys.version_info[:2]
if pyversion < (2, 7) or (3, 0) <= pyversion <= (3, 1):
install_requires.append('argparse')
-
+if pyversion < (3, 0):
+ install_requires.append('configparser')
setup(
name='ceph-deploy',