Skip to content

Commit

Permalink
fix: Don't filter out extras for a pip dependency.
Browse files Browse the repository at this point in the history
Before this change, the function was dropping extra dependencies. For
example:

if `Xblock[django]` was in `base.in`.  The output of the function would
only listk `Xblock` as a dependency.  Droping the extras which may have
further constraint requirements or more packages that are required.
  • Loading branch information
feanil committed Aug 7, 2023
1 parent 80bf2b5 commit 303a9e4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/update_setup_py.sh
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ echo -e "rules:
constraint_files = set()
# groups \"my-package-name<=x.y.z,...\" into (\"my-package-name\", \"<=x.y.z,...\")
requirement_line_regex = re.compile(r\"([a-zA-Z0-9-_.]+)([<>=][^#\s]+)?\")
requirement_line_regex = re.compile(r\"([a-zA-Z0-9-_.\[\]]+)([<>=][^#\s]+)?\")
def add_version_constraint_or_raise(current_line, current_requirements, add_if_not_present):
regex_match = requirement_line_regex.match(current_line)
Expand Down

0 comments on commit 303a9e4

Please sign in to comment.