Merge "Add the ability to ignore requirements from a given package"
This commit is contained in:
commit
e069d558b3
@ -85,9 +85,18 @@ def map_base_and_remote_packages(package, package_map):
|
|||||||
:type package: ``str``
|
:type package: ``str``
|
||||||
:type package_map: ``dict``
|
: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 package.startswith(('http:', 'https:', 'git+')):
|
||||||
if '@' not in package:
|
if '@' not in package:
|
||||||
package_map['packages'].add(package)
|
check_for_ignore(p=package)
|
||||||
else:
|
else:
|
||||||
git_parts = git_pip_link_parse(package)
|
git_parts = git_pip_link_parse(package)
|
||||||
package_name = git_parts[-2]
|
package_name = git_parts[-2]
|
||||||
@ -106,7 +115,7 @@ def map_base_and_remote_packages(package, package_map):
|
|||||||
else:
|
else:
|
||||||
package_map['remote_packages'].add(package)
|
package_map['remote_packages'].add(package)
|
||||||
else:
|
else:
|
||||||
package_map['packages'].add(package)
|
check_for_ignore(p=package)
|
||||||
|
|
||||||
|
|
||||||
def parse_remote_package_parts(package_map):
|
def parse_remote_package_parts(package_map):
|
||||||
|
Loading…
Reference in New Issue
Block a user