Add the ability to ignore requirements from a given package

Some packages simply do not play well with others. One such case is
"tempest" where time and time again it's unbound requirements break
everything. This change allows the package indexer to examine remote
repos and exclude packages from the global package building list by
using the metadata value ``ignorerequirements=True``. When a package is
ignored it can still be built within in a venv or used by referencing
the git repos however it will no longer be part of the global wheel
building package list.

Change-Id: Iacf15eea14a2cd9c98bbb59d99e2a1ea94bd0a5b
Closes-Bug: #1631992
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
This commit is contained in:
Kevin Carter 2016-10-27 00:37:10 -05:00 committed by Kevin Carter (cloudnull)
parent b34c7376cf
commit 7abcaf9197
1 changed files with 11 additions and 2 deletions

View File

@ -85,9 +85,18 @@ def map_base_and_remote_packages(package, package_map):
:type package: ``str``
:type package_map: ``dict``
"""
def check_for_ignore(p):
p_parts = GIT_PACKAGE_DEFAULT_PARTS.get(p)
if p_parts:
fragments = p_parts.get('fragments', '') or ''
if 'ignorerequirements=True' not in fragments:
package_map['packages'].add(p)
else:
package_map['packages'].add(p)
if package.startswith(('http:', 'https:', 'git+')):
if '@' not in package:
package_map['packages'].add(package)
check_for_ignore(p=package)
else:
git_parts = git_pip_link_parse(package)
package_name = git_parts[-2]
@ -106,7 +115,7 @@ def map_base_and_remote_packages(package, package_map):
else:
package_map['remote_packages'].add(package)
else:
package_map['packages'].add(package)
check_for_ignore(p=package)
def parse_remote_package_parts(package_map):