|
1 | 1 | # -*- coding: utf-8 -*-
|
2 | 2 | from __future__ import print_function, division, unicode_literals, absolute_import
|
3 |
| -from builtins import open |
4 | 3 |
|
5 | 4 | from future import standard_library
|
6 | 5 | standard_library.install_aliases()
|
7 |
| -from configparser import ConfigParser |
| 6 | +import configparser |
8 | 7 |
|
9 | 8 | import os
|
10 | 9 | import sys
|
11 | 10 | import subprocess
|
12 | 11 |
|
| 12 | +from .info import VERSION |
| 13 | + |
13 | 14 | COMMIT_INFO_FNAME = 'COMMIT_INFO.txt'
|
14 | 15 | PY3 = sys.version_info[0] >= 3
|
15 | 16 |
|
@@ -47,7 +48,10 @@ def pkg_commit_hash(pkg_path):
|
47 | 48 | pth = os.path.join(pkg_path, COMMIT_INFO_FNAME)
|
48 | 49 | if not os.path.isfile(pth):
|
49 | 50 | raise IOError('Missing commit info file %s' % pth)
|
50 |
| - cfg_parser = ConfigParser() |
| 51 | + if PY3: |
| 52 | + cfg_parser = configparser.RawConfigParser() |
| 53 | + else: |
| 54 | + cfg_parser = configparser.ConfigParser() |
51 | 55 | cfg_parser.read(pth)
|
52 | 56 | archive_subst = cfg_parser.get('commit hash', 'archive_subst_hash')
|
53 | 57 | if not archive_subst.startswith('$Format'): # it has been substituted
|
@@ -91,6 +95,7 @@ def get_pkg_info(pkg_path):
|
91 | 95 | pkg_path=pkg_path,
|
92 | 96 | commit_source=src,
|
93 | 97 | commit_hash=hsh,
|
| 98 | + nipype_version=VERSION, |
94 | 99 | sys_version=sys.version,
|
95 | 100 | sys_executable=sys.executable,
|
96 | 101 | sys_platform=sys.platform,
|
|
0 commit comments