Commit c0f57714 authored by Jason R. Coombs's avatar Jason R. Coombs

Tabs to spaces in two more files. Ref #489.

parent 0d3a8966
...@@ -4,25 +4,25 @@ from paver.easy import task, path as Path ...@@ -4,25 +4,25 @@ from paver.easy import task, path as Path
import pip import pip
def remove_all(paths): def remove_all(paths):
for path in paths: for path in paths:
path.rmtree() if path.isdir() else path.remove() path.rmtree() if path.isdir() else path.remove()
@task @task
def update_vendored(): def update_vendored():
vendor = Path('pkg_resources/_vendor') vendor = Path('pkg_resources/_vendor')
remove_all(vendor.glob('packaging*')) remove_all(vendor.glob('packaging*'))
remove_all(vendor.glob('six*')) remove_all(vendor.glob('six*'))
remove_all(vendor.glob('pyparsing*')) remove_all(vendor.glob('pyparsing*'))
install_args = [ install_args = [
'install', 'install',
'-r', str(vendor/'vendored.txt'), '-r', str(vendor/'vendored.txt'),
'-t', str(vendor), '-t', str(vendor),
] ]
pip.main(install_args) pip.main(install_args)
packaging = vendor / 'packaging' packaging = vendor / 'packaging'
for file in packaging.glob('*.py'): for file in packaging.glob('*.py'):
text = file.text() text = file.text()
text = re.sub(r' (pyparsing|six)', r' pkg_resources.extern.\1', text) text = re.sub(r' (pyparsing|six)', r' pkg_resources.extern.\1', text)
file.write_text(text) file.write_text(text)
remove_all(vendor.glob('*.dist-info')) remove_all(vendor.glob('*.dist-info'))
remove_all(vendor.glob('*.egg-info')) remove_all(vendor.glob('*.egg-info'))
import pkg_resources import pkg_resources
try: try:
__version__ = pkg_resources.require('setuptools')[0].version __version__ = pkg_resources.require('setuptools')[0].version
except Exception: except Exception:
__version__ = 'unknown' __version__ = 'unknown'
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment