Merge "dib-lint: python3 compatibility fixes"
This commit is contained in:
commit
084937617f
14
bin/dib-lint
14
bin/dib-lint
@ -34,11 +34,15 @@ parse_exclusions() {
|
|||||||
# ignore = sete setu
|
# ignore = sete setu
|
||||||
section="dib-lint"
|
section="dib-lint"
|
||||||
option="ignore"
|
option="ignore"
|
||||||
global_exclusions=$(python -c \
|
global_exclusions=$(python - <<EOF
|
||||||
"import ConfigParser; \
|
try:
|
||||||
conf=ConfigParser.ConfigParser(); \
|
import configparser
|
||||||
conf.read('tox.ini'); \
|
except ImportError:
|
||||||
print conf.get('$section', '$option') if conf.has_option('$section', '$option') else ''"
|
import ConfigParser as configparser
|
||||||
|
conf=configparser.ConfigParser()
|
||||||
|
conf.read('tox.ini')
|
||||||
|
print(conf.get('$section', '$option')) if conf.has_option('$section', '$option') else ''
|
||||||
|
EOF
|
||||||
)
|
)
|
||||||
echo $exclusions $global_exclusions
|
echo $exclusions $global_exclusions
|
||||||
}
|
}
|
||||||
|
@ -45,7 +45,7 @@ def main():
|
|||||||
if use_pypi_python_org:
|
if use_pypi_python_org:
|
||||||
indices.append('https://pypi.python.org/simple')
|
indices.append('https://pypi.python.org/simple')
|
||||||
retries = os.environ.get('DIB_PIP_RETRIES')
|
retries = os.environ.get('DIB_PIP_RETRIES')
|
||||||
with file(home + '/.pip/pip.conf', 'wt') as output:
|
with open(home + '/.pip/pip.conf', 'wt') as output:
|
||||||
output.write('[global]\n')
|
output.write('[global]\n')
|
||||||
output.write('log = %s/pip.log\n' % (home,))
|
output.write('log = %s/pip.log\n' % (home,))
|
||||||
output.write('index-url = %s\n' % (indices[0],))
|
output.write('index-url = %s\n' % (indices[0],))
|
||||||
@ -53,7 +53,7 @@ def main():
|
|||||||
output.write('retries = %s\n' % retries)
|
output.write('retries = %s\n' % retries)
|
||||||
for index in indices[1:]:
|
for index in indices[1:]:
|
||||||
output.write('extra-index-url = %s\n' % (index,))
|
output.write('extra-index-url = %s\n' % (index,))
|
||||||
with file(home + '/.pydistutils.cfg', 'wt') as output:
|
with open(home + '/.pydistutils.cfg', 'wt') as output:
|
||||||
output.write('[easy_install]\n')
|
output.write('[easy_install]\n')
|
||||||
output.write('index_url = %s\n' % (easy_index,))
|
output.write('index_url = %s\n' % (easy_index,))
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user