From 7d94d46358f6e93ec310b70a233c858bb72b171c Mon Sep 17 00:00:00 2001 From: Pavlo Shchelokovskyy Date: Sun, 15 Apr 2018 11:25:55 +0300 Subject: [PATCH] Remove install-requirements script this script is not used anywhere anymore, and it will not work with recent pip 10.x release due to changes in the pip API. Initially this script was meant to install only a limited set of requirements to run heat_integrationtests without having to install whole Heat. Since the split of heat_tempest_plugin the tests left in the heat_integrationtests are meant to be run only in a DevStack-like env, so all the requirements are already available. Change-Id: I94c82fe100dfb6557cc960ef1198f1195780f28f --- heat_integrationtests/install-requirements | 66 ---------------------- 1 file changed, 66 deletions(-) delete mode 100755 heat_integrationtests/install-requirements diff --git a/heat_integrationtests/install-requirements b/heat_integrationtests/install-requirements deleted file mode 100755 index a94d07b3c6..0000000000 --- a/heat_integrationtests/install-requirements +++ /dev/null @@ -1,66 +0,0 @@ -#!/usr/bin/env python -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. - -"""Generate and install requirements from stub file and source files.""" - -import argparse -import subprocess -import sys - -import pip - -parser = argparse.ArgumentParser(description='Sync requirements.') -parser.add_argument('--stub', metavar='STUBFILE', - required=True, - help="File with requirements stubs.") -parser.add_argument('--source', metavar='SOURCE', - required=True, action='append', - help="Source file to sync requirements from. " - "May be supplied several times.") -parser.add_argument('-t', '--target', metavar='TARGET', - required=True, - help="Target file to write synced requirements to.") -parser.add_argument('pipopts', metavar='PIP OPTIONS', - nargs=argparse.REMAINDER, - help='Options to pass to "pip install".') - -args = parser.parse_args() - -sources = {} -for requirements_file in args.source: - rqs = pip.req.req_file.parse_requirements(requirements_file, - session=False) - sources.update({s.name: s for s in rqs}) -stubs = list(pip.req.req_file.parse_requirements(args.stub, - session=False)) -reqs = [] -for r in stubs: - if r.name in sources: - # safe-guard for future additions to stub file - if r.specifier: - sys.exit("ERROR: package '%(pkg)s' in stub file %(stub)s " - "has version specified but is also present " - "in provided sources requirements. " - "Please remove version from the stub file." % { - 'pkg': r.name, 'stub': args.stub}) - reqs.append(sources[r.name]) - else: - reqs.append(r) - -with open(args.target, 'w') as target: - target.write('\n'.join([str(r.req) for r in reqs])) - -pip_install = ['pip', 'install', '-r', args.target] -pip_install.extend(args.pipopts) - -sys.exit(subprocess.call(pip_install))