Support per-requirement overrides in requirements.txt parsing

This commit is contained in:
Semyon Proshev
2016-05-24 17:29:59 +03:00
parent ef15b9b3d7
commit 3b5c62bf95
2 changed files with 23 additions and 1 deletions
@@ -135,6 +135,9 @@ public class PyRequirement {
"(?<" + VERSIONS_SPECS_GROUP + ">" + REQUIREMENT_VERSION_SPEC_REGEXP +
"(" + LINE_WS_REGEXP + "*," + LINE_WS_REGEXP + "*" + REQUIREMENT_VERSION_SPEC_REGEXP + ")*)?";
@NotNull
private static final String REQUIREMENT_OPTIONS_REGEXP = "((" + LINE_WS_REGEXP + "+(--global-option|--install-option)=\"[^\"]*\")+)?";
@NotNull
private static final Pattern REQUIREMENT = Pattern.compile(
REQUIREMENT_NAME_REGEXP +
@@ -142,6 +145,7 @@ public class PyRequirement {
REQUIREMENT_EXTRAS_REGEXP +
LINE_WS_REGEXP + "*" +
REQUIREMENT_VERSIONS_SPECS_REGEXP +
REQUIREMENT_OPTIONS_REGEXP +
COMMENT_REGEXP);
@NotNull