From b49435397a5094f94678adf3549cc8941aa469b7 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 5 Jul 2014 15:06:51 -0400 Subject: Use six for Python 2 compatibility --HG-- branch : feature/issue-229 extra : source : 7b1997ececc5772798ce33a0f8e77387cb55a977 --- setuptools/command/setopt.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'setuptools/command/setopt.py') diff --git a/setuptools/command/setopt.py b/setuptools/command/setopt.py index a04d6032..f78e0cd5 100755 --- a/setuptools/command/setopt.py +++ b/setuptools/command/setopt.py @@ -4,6 +4,8 @@ from distutils.errors import DistutilsOptionError import distutils import os +from six.moves import configparser + from setuptools import Command @@ -37,10 +39,8 @@ def edit_config(filename, settings, dry_run=False): while a dictionary lists settings to be changed or deleted in that section. A setting of ``None`` means to delete that setting. """ - from setuptools.compat import ConfigParser - log.debug("Reading configuration from %s", filename) - opts = ConfigParser.RawConfigParser() + opts = configparser.RawConfigParser() opts.read([filename]) for section, options in settings.items(): if options is None: -- cgit v1.2.3 From 06872bb0bbbeb953e90bd0941444b0d499056557 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 31 Dec 2015 11:51:01 -0500 Subject: Update vendoring technique to match that used for packaging. Ref #229. --HG-- branch : feature/issue-229 --- setuptools/command/setopt.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'setuptools/command/setopt.py') diff --git a/setuptools/command/setopt.py b/setuptools/command/setopt.py index f78e0cd5..1441e512 100755 --- a/setuptools/command/setopt.py +++ b/setuptools/command/setopt.py @@ -4,7 +4,12 @@ from distutils.errors import DistutilsOptionError import distutils import os -from six.moves import configparser +try: + from setuptools._vendor.six.moves import configparser +except ImportError: + # fallback to naturally-installed version; allows system packagers to + # omit vendored packages. + from six.moves import configparser from setuptools import Command -- cgit v1.2.3 From 952c1bafda1929c74c737646aa025e6ffad6632e Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 31 Dec 2015 16:30:47 -0500 Subject: Modeling after Astropy's technique for bundling libraries, the imports are now much cleaner. Thanks @embray. Ref #229. --HG-- branch : feature/issue-229 --- setuptools/command/setopt.py | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'setuptools/command/setopt.py') diff --git a/setuptools/command/setopt.py b/setuptools/command/setopt.py index 1441e512..7f332be5 100755 --- a/setuptools/command/setopt.py +++ b/setuptools/command/setopt.py @@ -4,12 +4,7 @@ from distutils.errors import DistutilsOptionError import distutils import os -try: - from setuptools._vendor.six.moves import configparser -except ImportError: - # fallback to naturally-installed version; allows system packagers to - # omit vendored packages. - from six.moves import configparser +from setuptools.extern.six.moves import configparser from setuptools import Command -- cgit v1.2.3