Bug 1155160 - Remove script for generating the vendor directory

We're no longer using the vendor directory & this script wasn't entirely
reliable anyway, so let's remove it. The virtualenv package can be
removed from dev.txt, since virtualenv is installed globally, and
nothing inside our virtualenv (which is where the packages in dev.txt
end up) needs a local installation of it.
This commit is contained in:
Ed Morley 2015-04-22 11:23:32 +01:00
Родитель 878262b358
Коммит eaf0c2a792
2 изменённых файлов: 0 добавлений и 56 удалений

Просмотреть файл

@ -1,52 +0,0 @@
#!/usr/bin/env python
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, you can obtain one at http://mozilla.org/MPL/2.0/.
"""
(Re)-generate the vendor library in ``vendor/`` from the requirements listed
in ``requirements/checked-in.txt``.
This script will destroy everything in ``vendor/`` and replace it! You've been
warned.
Requires virtualenv. (We have to make an empty virtualenv and run in that,
because pip's --ignore-installed flag is buggy).
"""
import os
import shutil
import subprocess
import tempfile
from virtualenv import create_environment
def generate_vendor_lib():
base = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
target = os.path.join(base, "vendor")
reqs = os.path.join(base, "requirements", "checked-in.txt")
venv = tempfile.mkdtemp("-generate-vendor-lib")
try:
shutil.rmtree(target)
os.mkdir(target)
create_environment(venv, site_packages=False)
venv_python = os.path.join(venv, "bin", "python")
peep = os.path.join(base, "bin", "peep.py")
subprocess.check_call(
"{0} {1} install --no-deps -r {2} "
'--install-option="--install-purelib={3}" '
'--install-option="--install-data={3}"'.format(
venv_python, peep, reqs, target),
shell=True,
)
finally:
shutil.rmtree(venv)
if __name__ == "__main__":
generate_vendor_lib()

Просмотреть файл

@ -19,10 +19,6 @@ responses==0.3.0
# sha256: P8n8hnJTAsWCGUO4veTde4L6PRY2VeLhQHSbmhZgcYE
django-extensions==1.5.1
# in order to be able to run bin/generate-vendor-lib.py
# sha256: _XeKxeX_6HCj-3fW2A6BguCl8_xA2R-DVwYQRLeERDU
virtualenv==12.0.7
#for celery auto-reloading
# sha256: 58UqnzbO4nxdCTHs-SlZzQIjF7AJAb007wXs5KKlyxs
pyinotify==0.9.5