Commit 1edd380c authored by Jason R. Coombs's avatar Jason R. Coombs

Replace makefile with pavement file, granting portability on OS X and Windows. Fixes #505.

parent 52cd445e
empty:
exit 1
update-vendored:
rm -rf pkg_resources/_vendor/packaging*
rm -rf pkg_resources/_vendor/six*
rm -rf pkg_resources/_vendor/pyparsing*
python3 -m pip install -r pkg_resources/_vendor/vendored.txt -t pkg_resources/_vendor/
sed -i 's/ \(pyparsing\|six\)/ pkg_resources.extern.\1/' \
pkg_resources/_vendor/packaging/*.py
rm -rf pkg_resources/_vendor/*.{egg,dist}-info
import re
from paver.easy import task, path as Path
import pip
def remove_all(paths):
for path in paths:
path.rmtree() if path.isdir() else path.remove()
@task
def update_vendored():
vendor = Path('pkg_resources/_vendor')
remove_all(vendor.glob('packaging*'))
remove_all(vendor.glob('six*'))
remove_all(vendor.glob('pyparsing*'))
install_args = [
'install',
'-r', str(vendor/'vendored.txt'),
'-t', str(vendor),
]
pip.main(install_args)
packaging = vendor / 'packaging'
for file in packaging.glob('*.py'):
text = file.text()
text = re.sub(r' (pyparsing|six)', r' pkg_resources.extern.\1', text)
file.write_text(text)
remove_all(vendor.glob('*.dist-info'))
remove_all(vendor.glob('*.egg-info'))
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