diff --git a/python-derpconf-no-six.patch b/python-derpconf-no-six.patch new file mode 100644 index 0000000..d3ac5bb --- /dev/null +++ b/python-derpconf-no-six.patch @@ -0,0 +1,98 @@ +Index: derpconf-0.8.3/debian/control +=================================================================== +--- derpconf-0.8.3.orig/debian/control ++++ derpconf-0.8.3/debian/control +@@ -13,7 +13,6 @@ Build-Depends: debhelper (>= 9), + python-coverage, + python-colorama, + python-tox, +- python-six + X-Python-Version: >= 2.6 + Homepage: https://github.com/globocom/derpconf + Vcs-Git: git://github.com/globocom/derpconf.git +@@ -21,7 +20,7 @@ Vcs-Browser: https://github.com/globocom + + Package: python-derpconf + Architecture: all +-Depends: ${misc:Depends}, ${python:Depends}, python-six ++Depends: ${misc:Depends}, ${python:Depends} + Provides: ${python:Provides} + Description: Python module to abstract loading configuration files for your app + Abstracts loading configuration files for your app. +Index: derpconf-0.8.3/derpconf/config.py +=================================================================== +--- derpconf-0.8.3.orig/derpconf/config.py ++++ derpconf-0.8.3/derpconf/config.py +@@ -15,7 +15,6 @@ from collections import defaultdict + from os.path import join, exists, abspath, dirname, isdir + import imp + +-import six + from textwrap import fill + + +@@ -96,7 +95,7 @@ class Config(object): + code = config_file.read() + module = imp.new_module(name) + +- six.exec_(code, module.__dict__) ++ exec(code, module.__dict__) + + conf.config_file = path + +@@ -120,7 +119,7 @@ class Config(object): + code = config_file.read() + module = imp.new_module(name) + +- six.exec_(code, module.__dict__) ++ exec(code, module.__dict__) + + conf = cls(defaults=[]) + +@@ -310,7 +309,7 @@ def format_tuple(value, tabs=0): + + + def format_value(value): +- if isinstance(value, six.string_types): ++ if isinstance(value, str): + return "'%s'" % value + + if isinstance(value, (tuple, list, set)): +Index: derpconf-0.8.3/requirements.txt +=================================================================== +--- derpconf-0.8.3.orig/requirements.txt ++++ derpconf-0.8.3/requirements.txt +@@ -3,4 +3,3 @@ pyVows + coverage + colorama + tox +-six +Index: derpconf-0.8.3/setup.py +=================================================================== +--- derpconf-0.8.3.orig/setup.py ++++ derpconf-0.8.3/setup.py +@@ -18,7 +18,6 @@ tests_require = [ + 'coverage', + 'colorama', + 'tox', +- 'six', + ] + + +@@ -47,7 +46,6 @@ def run_setup(extension_modules=[]): + packages=['derpconf'], + package_dir={"derpconf": "derpconf"}, + install_requires=[ +- 'six', + ], + + extras_require={ +Index: derpconf-0.8.3/tox.ini +=================================================================== +--- derpconf-0.8.3.orig/tox.ini ++++ derpconf-0.8.3/tox.ini +@@ -13,4 +13,3 @@ deps = + pyVows + coverage + colorama +- six diff --git a/python-derpconf.changes b/python-derpconf.changes index 09db527..a9ba32a 100644 --- a/python-derpconf.changes +++ b/python-derpconf.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Thu May 11 08:28:51 UTC 2023 - pgajdos@suse.com + +- do not require six +- added patches + fix https://github.com/globocom/derpconf/issues/26 + + python-derpconf-no-six.patch + ------------------------------------------------------------------- Thu Feb 21 02:12:05 AM UTC 2019 - John Vandenberg diff --git a/python-derpconf.spec b/python-derpconf.spec index 89f16d7..036f3c0 100644 --- a/python-derpconf.spec +++ b/python-derpconf.spec @@ -1,7 +1,7 @@ # # spec file for package python-derpconf # -# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2023 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -16,7 +16,6 @@ # -%{?!python_module:%define python_module() python-%{**} python3-%{**}} Name: python-derpconf Version: 0.8.3 Release: 0 @@ -25,12 +24,12 @@ License: MIT Group: Development/Languages/Python URL: https://github.com/globocom/derpconf Source: https://github.com/globocom/derpconf/archive/v%{version}.tar.gz#/derpconf-%{version}.tar.gz +# https://github.com/globocom/derpconf/issues/26 +Patch0: python-derpconf-no-six.patch BuildRequires: %{python_module pyVows} BuildRequires: %{python_module setuptools} -BuildRequires: %{python_module six} BuildRequires: fdupes BuildRequires: python-rpm-macros -Requires: python-six BuildArch: noarch %python_subpackages @@ -38,9 +37,10 @@ BuildArch: noarch derpconf abstracts loading configuration files for your app. %prep -%setup -q -n derpconf-%{version} +%autosetup -p1 -n derpconf-%{version} %build +sed -i '1{/^#!/ d}' derpconf/*.py %python_build %install @@ -53,6 +53,6 @@ derpconf abstracts loading configuration files for your app. %files %{python_files} %license LICENSE %doc README.md -%{python_sitelib}/* +%{python_sitelib}/derpconf* %changelog