Skip to content
This repository has been archived by the owner on Jul 17, 2023. It is now read-only.

Allow installation of python packages with extras #49

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion python/requirements.build_defs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ def requirements_txt(name:str, src:str='requirements.txt', zip_safe:bool=True, t
srcs = [src],
cmd = 'cat $SRCS',
post_build = lambda _, output: [add_dep(name, auto_pip_library(
name = line.partition('=')[0].rstrip('>=< '),
name = line.partition('=')[0].rstrip('>=<] ').replace('[', '_'),
package = line.partition('#')[0].rstrip(' '), # remove comments and strip spaces
)) for line in output if not line.startswith('#') and len(line.strip()) > 0],
deps = deps,
Expand Down
5 changes: 4 additions & 1 deletion python/test/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,7 @@ six
# Allow empty lines in requirements file

# Specify a particular version (not the latest) of attrs.
attrs==18.1.0 # Allow comments after a dependency
attrs==18.1.0 # Allow comments after a dependency

# Allow for a package with "extras"
passlib[argon2]