/
niceSOFT
/
python3-py
Обзор
Документация
Войти
/
niceSOFT
/
python3-py
Код
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
1.5.2
tasks/vendoring.py
23 строки
760 B
Ronny Pfannschmidt
switch iniconfig and apipkg to correct vendoring
24 июн 2017, 17:56
24 июн 2017, 17:56
7eff6f3
Код
Авторство
О чём код?
from __future__ import absolute_import, print_function import py import invoke VENDOR_TARGET = py.path.local("py/_vendored_packages") GOOD_FILES = 'README.md', '__init__.py' @invoke.task() def remove_libs(ctx): print("removing vendored libs") for path in VENDOR_TARGET.listdir(): if path.basename not in GOOD_FILES: print(" ", path) path.remove() @invoke.task(pre=[remove_libs]) def update_libs(ctx): print("installing libs") ctx.run("pip install -t {target} apipkg iniconfig".format(target=VENDOR_TARGET)) ctx.run("git add {target}".format(target=VENDOR_TARGET)) print("Please commit to finish the update after running the tests:") print() print(' git commit -am "Updated vendored libs"')