diff -Nru stsci.distutils-0.3.2/CHANGES.txt stsci.distutils-0.3.6/CHANGES.txt --- stsci.distutils-0.3.2/CHANGES.txt 2013-03-27 17:51:05.000000000 +0000 +++ stsci.distutils-0.3.6/CHANGES.txt 2013-11-21 20:40:12.000000000 +0000 @@ -1,6 +1,42 @@ Changelog =========== +0.3.6 (2013-11-21) +------------------ + +- Fixed a syntax error in Python 3 that was introduced in 0.3.5. This + could occur very early in the setup such that it bailed before even 2to3 + could run on the rest of the package. + + +0.3.5 (2013-11-18) +------------------ + +- Fixed an obscure issue that could occur when trying to install with + easy_install on Python 2 systems that have lib2to3 installed but have never + used it. + + +0.3.4 (2013-07-31) +------------------ + +- Updated the check for ``__loader__`` added in v0.3.3 to only perform + that check on Python >= 3.3, since the issue doesn't apply to older + Python versions. + + +0.3.3 (2013-07-25) +------------------ + +- Updated the import-time SVN revision update mechanism in the ``version.py`` + module generated by the ``version_setup_hook`` to avoid running when not in + a dev version of the package. This saves time on importing released + packages when installed on users' systems. + +- Added a workaround to a bug on Python 3.3 that could cause stsci.distutils + to crash during installation. + + 0.3.2 (2013-03-27) ------------------ diff -Nru stsci.distutils-0.3.2/PKG-INFO stsci.distutils-0.3.6/PKG-INFO --- stsci.distutils-0.3.2/PKG-INFO 2013-03-27 17:52:30.000000000 +0000 +++ stsci.distutils-0.3.6/PKG-INFO 2013-11-21 20:40:24.000000000 +0000 @@ -1,6 +1,6 @@ Metadata-Version: 1.1 Name: stsci.distutils -Version: 0.3.2 +Version: 0.3.6 Summary: distutils/packaging-related utilities used by some of STScI's packages Home-page: http://www.stsci.edu/resources/software_hardware/stsci_python Author: Erik M. Bray @@ -158,6 +158,42 @@ Changelog =========== + 0.3.6 (2013-11-21) + ------------------ + + - Fixed a syntax error in Python 3 that was introduced in 0.3.5. This + could occur very early in the setup such that it bailed before even 2to3 + could run on the rest of the package. + + + 0.3.5 (2013-11-18) + ------------------ + + - Fixed an obscure issue that could occur when trying to install with + easy_install on Python 2 systems that have lib2to3 installed but have never + used it. + + + 0.3.4 (2013-07-31) + ------------------ + + - Updated the check for ``__loader__`` added in v0.3.3 to only perform + that check on Python >= 3.3, since the issue doesn't apply to older + Python versions. + + + 0.3.3 (2013-07-25) + ------------------ + + - Updated the import-time SVN revision update mechanism in the ``version.py`` + module generated by the ``version_setup_hook`` to avoid running when not in + a dev version of the package. This saves time on importing released + packages when installed on users' systems. + + - Added a workaround to a bug on Python 3.3 that could cause stsci.distutils + to crash during installation. + + 0.3.2 (2013-03-27) ------------------ diff -Nru stsci.distutils-0.3.2/debian/changelog stsci.distutils-0.3.6/debian/changelog --- stsci.distutils-0.3.2/debian/changelog 2013-05-09 11:41:27.000000000 +0000 +++ stsci.distutils-0.3.6/debian/changelog 2013-12-07 15:09:53.000000000 +0000 @@ -1,3 +1,10 @@ +stsci.distutils (0.3.6-1) unstable; urgency=low + + * New upstream version. + * Bump Standards-Version to 3.9.5 (no changes). + + -- Aurelien Jarno Sat, 07 Dec 2013 16:06:55 +0100 + stsci.distutils (0.3.2-1) unstable; urgency=low [ Aurelien Jarno ] diff -Nru stsci.distutils-0.3.2/debian/control stsci.distutils-0.3.6/debian/control --- stsci.distutils-0.3.2/debian/control 2013-05-09 11:40:39.000000000 +0000 +++ stsci.distutils-0.3.6/debian/control 2013-12-07 15:07:30.000000000 +0000 @@ -6,7 +6,7 @@ Build-Depends: debhelper (>= 7.0.50~), python-all (>= 2.6.6-3~), python-setuptools, python-d2to1 (>= 0.2.9~), python3-all (>= 3.1.2-6~), python3-setuptools, python3-d2to1 (>= 0.2.9~) X-Python-Version: >= 2.5 X-Python3-Version: >= 3.0 -Standards-Version: 3.9.4 +Standards-Version: 3.9.5 Homepage: http://pypi.python.org/pypi/stsci.distutils Vcs-Svn: svn://anonscm.debian.org/python-modules/packages/stsci.distutils/trunk/ Vcs-Browser: http://anonscm.debian.org/viewvc/python-modules/packages/stsci.distutils/trunk/ diff -Nru stsci.distutils-0.3.2/setup.cfg stsci.distutils-0.3.6/setup.cfg --- stsci.distutils-0.3.2/setup.cfg 2013-03-27 17:52:30.000000000 +0000 +++ stsci.distutils-0.3.6/setup.cfg 2013-11-21 20:40:24.000000000 +0000 @@ -1,6 +1,6 @@ [metadata] name = stsci.distutils -version = 0.3.2 +version = 0.3.6 author = Erik M. Bray author-email = embray@stsci.edu home-page = http://www.stsci.edu/resources/software_hardware/stsci_python diff -Nru stsci.distutils-0.3.2/stsci/distutils/astutils.py stsci.distutils-0.3.6/stsci/distutils/astutils.py --- stsci.distutils-0.3.2/stsci/distutils/astutils.py 2013-03-27 17:51:05.000000000 +0000 +++ stsci.distutils-0.3.6/stsci/distutils/astutils.py 2013-11-21 20:40:12.000000000 +0000 @@ -7,7 +7,9 @@ import os +import sys +from distutils import log try: import ast # Python >= 2.6 @@ -22,10 +24,14 @@ try: tree = ast.parse(open(filename, 'r').read()) except SyntaxError: + if sys.version_info[0] < 3: + e = sys.exc_info()[1] + log.warn('SyntaxError while parsing file %s: %s' % + (filename, str(e))) + return # We're probably in Python 3 and looking at a file intended for # Python 2. Otherwise there's an unintended SyntaxError in the # file, so there are bigger problems anyways - # TODO: Maybe issue a warning? try: import lib2to3.refactor @@ -74,27 +80,27 @@ for name in node.names: self.importfroms.add((node.modname, name[0], name[1])) -try: - import lib2to3.refactor - - class StringRefactoringTool(lib2to3.refactor.RefactoringTool): - """A RefactoringTool that saves refactored files as strings in the - self.refactored dict rather than outputting to actual files. - - This is used in case we're running in Python 3 and need to refactor a - file before parsing its syntax tree. - """ - - def __init__(self, fixer_names, options=None, explicit=None): - super(StringRefactoringTool, self).__init__(fixer_names, options, - explicit) - self.refactored = {} - - def write_file(self, new_text, filename, old_text, encoding=None): - self.refactored[filename] = new_text - -except ImportError: - pass +if sys.version_info[0] >= 3: + try: + import lib2to3.refactor + + class StringRefactoringTool(lib2to3.refactor.RefactoringTool): + """A RefactoringTool that saves refactored files as strings in the + self.refactored dict rather than outputting to actual files. + + This is used in case we're running in Python 3 and need to refactor + a file before parsing its syntax tree. + """ + + def __init__(self, fixer_names, options=None, explicit=None): + super(StringRefactoringTool, self).__init__(fixer_names, + options, + explicit) + self.refactored = {} + def write_file(self, new_text, filename, old_text, encoding=None): + self.refactored[filename] = new_text + except ImportError: + pass diff -Nru stsci.distutils-0.3.2/stsci/distutils/hooks.py stsci.distutils-0.3.6/stsci/distutils/hooks.py --- stsci.distutils-0.3.2/stsci/distutils/hooks.py 2013-03-27 17:51:05.000000000 +0000 +++ stsci.distutils-0.3.6/stsci/distutils/hooks.py 2013-11-21 20:40:12.000000000 +0000 @@ -108,13 +108,26 @@ sys.path.insert(0, root) # Reload the stsci namespace package in case any new paths can be added to - # it from the new sys.path entry + # it from the new sys.path entry; depending on how the namespace packages + # are installed this may fail--specifically if it's using the old + # setuptools-based .pth approach there is not importable package called + # 'stsci' that can be imported by itself. if 'stsci' in sys.modules: - try : - reload(sys.modules['stsci']) - except ImportError: - # doesn't seem to bother anything when this reload() fails - pass + mod = sys.modules['stsci'] + if sys.version_info[:2] >= (3, 3) and not hasattr(mod, '__loader__'): + # Workaround for Python bug #17099 on Python 3.3, where reload() + # crashes if a module doesn't have an __loader__ attribute + del sys.modules['stsci'] + try: + import stsci + except ImportError: + pass + else: + try : + reload(sys.modules['stsci']) + except ImportError: + # doesn't seem to bother anything when this reload() fails + pass def tag_svn_revision(config): @@ -399,7 +412,8 @@ 'Please install Numpy on your system first.\n\n') sys.exit(1) - includes = [numpy.get_numarray_include(), numpy.get_include()] + includes = [numpy.get_include()] + #includes = [numpy.get_numarray_include(), numpy.get_include()] for extension in command_obj.extensions: if 'numpy' not in extension.include_dirs: continue diff -Nru stsci.distutils-0.3.2/stsci/distutils/release.py stsci.distutils-0.3.6/stsci/distutils/release.py --- stsci.distutils-0.3.2/stsci/distutils/release.py 2013-03-27 17:51:05.000000000 +0000 +++ stsci.distutils-0.3.6/stsci/distutils/release.py 2013-11-21 20:40:12.000000000 +0000 @@ -44,7 +44,7 @@ def fix_dev_version_template(data): """ - A postreleaser.middle hook to change the dev_version_template from the + A postreleaser.before hook to change the dev_version_template from the annoying default of 'x.y.z.dev0' to just 'x.y.z.dev' without the 0. """ diff -Nru stsci.distutils-0.3.2/stsci/distutils/tests/test_hooks.py stsci.distutils-0.3.6/stsci/distutils/tests/test_hooks.py --- stsci.distutils-0.3.2/stsci/distutils/tests/test_hooks.py 2013-03-27 17:51:05.000000000 +0000 +++ stsci.distutils-0.3.6/stsci/distutils/tests/test_hooks.py 2013-11-21 20:40:12.000000000 +0000 @@ -143,7 +143,8 @@ # compile a c file to an object, so that should include all the # include paths. This is of course not universally true, but it # should hold true for this test case - for path in [numpy.get_include(), numpy.get_numarray_include()]: + for path in [numpy.get_include()]: + #for path in [numpy.get_include(), numpy.get_numarray_include()]: assert '-I' + path in args break @@ -162,7 +163,8 @@ continue if args[0] != compiler_cmd: continue - for path in [numpy.get_include(), numpy.get_numarray_include()]: + for path in [numpy.get_include()]: + #for path in [numpy.get_include(), numpy.get_numarray_include()]: assert '-I' + path not in args def test_glob_data_files(self): diff -Nru stsci.distutils-0.3.2/stsci/distutils/version.py stsci.distutils-0.3.6/stsci/distutils/version.py --- stsci.distutils-0.3.2/stsci/distutils/version.py 2013-03-27 17:52:26.000000000 +0000 +++ stsci.distutils-0.3.6/stsci/distutils/version.py 2013-11-21 20:40:21.000000000 +0000 @@ -7,66 +7,75 @@ import datetime -__version__ = '0.3.2' +__version__ = '0.3.6' __vdate__ = 'unspecified' -__svn_revision__ = '23957' -__svn_full_info__ = 'Path: stsci.distutils-0.3.2-SjZIz2\nWorking Copy Root Path: /tmp/stsci.distutils-0.3.2-SjZIz2\nURL: https://svn.stsci.edu/svn/ssb/stsci_python/stsci.distutils/tags/0.3.2\nRepository Root: https://svn.stsci.edu/svn/ssb/stsci_python\nRepository UUID: fe389314-cf27-0410-b35b-8c050e845b92\nRevision: 23957\nNode Kind: directory\nSchedule: normal\nLast Changed Author: embray\nLast Changed Rev: 23957\nLast Changed Date: 2013-03-27 13:51:01 -0400 (Wed, 27 Mar 2013)' -__setup_datetime__ = datetime.datetime(2013, 3, 27, 13, 52, 26, 506487) +__svn_revision__ = '27489' +__svn_full_info__ = 'Path: stsci.distutils-0.3.6-ZtSR4L\nWorking Copy Root Path: /tmp/stsci.distutils-0.3.6-ZtSR4L\nURL: https://svn.stsci.edu/svn/ssb/stsci_python/stsci.distutils/tags/0.3.6\nRepository Root: https://svn.stsci.edu/svn/ssb/stsci_python\nRepository UUID: fe389314-cf27-0410-b35b-8c050e845b92\nRevision: 27489\nNode Kind: directory\nSchedule: normal\nLast Changed Author: embray\nLast Changed Rev: 27489\nLast Changed Date: 2013-11-21 15:40:06 -0500 (Thu, 21 Nov 2013)' +__setup_datetime__ = datetime.datetime(2013, 11, 21, 15, 40, 21, 650681) # what version of stsci.distutils created this version.py -stsci_distutils_version = '0.3.2' +stsci_distutils_version = '0.3.6' - -def update_svn_info(): - """Update the SVN info if running out of an SVN working copy.""" - - import os - import string - import subprocess - - global __svn_revision__ - global __svn_full_info__ - - # Wind up the module path until we find the root of the project - # containing setup.py - path = os.path.abspath(os.path.dirname(__file__)) - dirname = os.path.dirname(path) - setup_py = os.path.join(path, 'setup.py') - while path != dirname and not os.path.exists(setup_py): - path = os.path.dirname(path) - dirname = os.path.dirname(path) - setup_py = os.path.join(path, 'setup.py') - - try: - pipe = subprocess.Popen(['svnversion', path], - stdout=subprocess.PIPE, - stderr=subprocess.PIPE) - if pipe.wait() == 0: - stdout = pipe.stdout.read().decode('latin1').strip() - if stdout and stdout[0] in string.digits: - __svn_revision__ = stdout - except OSError: - pass - - try: - pipe = subprocess.Popen(['svn', 'info', path], - stdout=subprocess.PIPE, - stderr=subprocess.PIPE) - if pipe.wait() == 0: - lines = [] - for line in pipe.stdout.readlines(): - line = line.decode('latin1').strip() - if not line: - continue - lines.append(line) - - if not lines: - __svn_full_info__ = 'unknown' +if '.dev' in __version__: + def update_svn_info(): + """Update the SVN info if running out of an SVN working copy.""" + + import os + import string + import subprocess + + global __svn_revision__ + global __svn_full_info__ + + path = os.path.abspath(os.path.dirname(__file__)) + + run_svnversion = True + + try: + pipe = subprocess.Popen(['svn', 'info', path], + stdout=subprocess.PIPE, + stderr=subprocess.PIPE) + if pipe.wait() == 0: + lines = [] + for line in pipe.stdout.readlines(): + line = line.decode('latin1').strip() + if not line: + continue + lines.append(line) + + if not lines: + __svn_full_info__ = ['unknown'] + else: + __svn_full_info__ = lines else: - __svn_full_info__ = '\n'.join(lines) - except OSError: - pass + run_svnversion = False + except OSError: + run_svnversion = False + + if run_svnversion: + # If updating the __svn_full_info__ succeeded then use its output + # to find the base of the working copy and use svnversion to get + # the svn revision. + for line in __svn_full_info__: + if line.startswith('Working Copy Root Path'): + path = line.split(':', 1)[1].strip() + break + + try: + pipe = subprocess.Popen(['svnversion', path], + stdout=subprocess.PIPE, + stderr=subprocess.PIPE) + if pipe.wait() == 0: + stdout = pipe.stdout.read().decode('latin1').strip() + if stdout and stdout[0] in string.digits: + __svn_revision__ = stdout + except OSError: + pass + + # Convert __svn_full_info__ back to a string + if isinstance(__svn_full_info__, list): + __svn_full_info__ = '\n'.join(__svn_full_info__) -update_svn_info() -del update_svn_info + update_svn_info() + del update_svn_info diff -Nru stsci.distutils-0.3.2/stsci/distutils/versionutils.py stsci.distutils-0.3.6/stsci/distutils/versionutils.py --- stsci.distutils-0.3.2/stsci/distutils/versionutils.py 2013-03-27 17:51:05.000000000 +0000 +++ stsci.distutils-0.3.6/stsci/distutils/versionutils.py 2013-11-21 20:40:12.000000000 +0000 @@ -33,60 +33,69 @@ # what version of stsci.distutils created this version.py stsci_distutils_version = %(stsci_distutils_version)r - -def update_svn_info(): - \"\"\"Update the SVN info if running out of an SVN working copy.\"\"\" - - import os - import string - import subprocess - - global __svn_revision__ - global __svn_full_info__ - - # Wind up the module path until we find the root of the project - # containing setup.py - path = os.path.abspath(os.path.dirname(__file__)) - dirname = os.path.dirname(path) - setup_py = os.path.join(path, 'setup.py') - while path != dirname and not os.path.exists(setup_py): - path = os.path.dirname(path) - dirname = os.path.dirname(path) - setup_py = os.path.join(path, 'setup.py') - - try: - pipe = subprocess.Popen(['svnversion', path], - stdout=subprocess.PIPE, - stderr=subprocess.PIPE) - if pipe.wait() == 0: - stdout = pipe.stdout.read().decode('latin1').strip() - if stdout and stdout[0] in string.digits: - __svn_revision__ = stdout - except OSError: - pass - - try: - pipe = subprocess.Popen(['svn', 'info', path], - stdout=subprocess.PIPE, - stderr=subprocess.PIPE) - if pipe.wait() == 0: - lines = [] - for line in pipe.stdout.readlines(): - line = line.decode('latin1').strip() - if not line: - continue - lines.append(line) - - if not lines: - __svn_full_info__ = 'unknown' +if '.dev' in __version__: + def update_svn_info(): + \"\"\"Update the SVN info if running out of an SVN working copy.\"\"\" + + import os + import string + import subprocess + + global __svn_revision__ + global __svn_full_info__ + + path = os.path.abspath(os.path.dirname(__file__)) + + run_svnversion = True + + try: + pipe = subprocess.Popen(['svn', 'info', path], + stdout=subprocess.PIPE, + stderr=subprocess.PIPE) + if pipe.wait() == 0: + lines = [] + for line in pipe.stdout.readlines(): + line = line.decode('latin1').strip() + if not line: + continue + lines.append(line) + + if not lines: + __svn_full_info__ = ['unknown'] + else: + __svn_full_info__ = lines else: - __svn_full_info__ = '\\n'.join(lines) - except OSError: - pass + run_svnversion = False + except OSError: + run_svnversion = False + + if run_svnversion: + # If updating the __svn_full_info__ succeeded then use its output + # to find the base of the working copy and use svnversion to get + # the svn revision. + for line in __svn_full_info__: + if line.startswith('Working Copy Root Path'): + path = line.split(':', 1)[1].strip() + break + + try: + pipe = subprocess.Popen(['svnversion', path], + stdout=subprocess.PIPE, + stderr=subprocess.PIPE) + if pipe.wait() == 0: + stdout = pipe.stdout.read().decode('latin1').strip() + if stdout and stdout[0] in string.digits: + __svn_revision__ = stdout + except OSError: + pass + + # Convert __svn_full_info__ back to a string + if isinstance(__svn_full_info__, list): + __svn_full_info__ = '\\n'.join(__svn_full_info__) -update_svn_info() -del update_svn_info + update_svn_info() + del update_svn_info """[1:] diff -Nru stsci.distutils-0.3.2/stsci.distutils.egg-info/PKG-INFO stsci.distutils-0.3.6/stsci.distutils.egg-info/PKG-INFO --- stsci.distutils-0.3.2/stsci.distutils.egg-info/PKG-INFO 2013-03-27 17:52:26.000000000 +0000 +++ stsci.distutils-0.3.6/stsci.distutils.egg-info/PKG-INFO 2013-11-21 20:40:21.000000000 +0000 @@ -1,6 +1,6 @@ Metadata-Version: 1.1 Name: stsci.distutils -Version: 0.3.2 +Version: 0.3.6 Summary: distutils/packaging-related utilities used by some of STScI's packages Home-page: http://www.stsci.edu/resources/software_hardware/stsci_python Author: Erik M. Bray @@ -158,6 +158,42 @@ Changelog =========== + 0.3.6 (2013-11-21) + ------------------ + + - Fixed a syntax error in Python 3 that was introduced in 0.3.5. This + could occur very early in the setup such that it bailed before even 2to3 + could run on the rest of the package. + + + 0.3.5 (2013-11-18) + ------------------ + + - Fixed an obscure issue that could occur when trying to install with + easy_install on Python 2 systems that have lib2to3 installed but have never + used it. + + + 0.3.4 (2013-07-31) + ------------------ + + - Updated the check for ``__loader__`` added in v0.3.3 to only perform + that check on Python >= 3.3, since the issue doesn't apply to older + Python versions. + + + 0.3.3 (2013-07-25) + ------------------ + + - Updated the import-time SVN revision update mechanism in the ``version.py`` + module generated by the ``version_setup_hook`` to avoid running when not in + a dev version of the package. This saves time on importing released + packages when installed on users' systems. + + - Added a workaround to a bug on Python 3.3 that could cause stsci.distutils + to crash during installation. + + 0.3.2 (2013-03-27) ------------------