From e852e3cd8d1b30805ba902390168b036b6279b28 Mon Sep 17 00:00:00 2001 From: Andrew Womeldorf Date: Wed, 12 Aug 2020 14:31:06 -0500 Subject: [PATCH] Allow installation of python packages with extras --- python/requirements.build_defs | 2 +- python/test/requirements.txt | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/python/requirements.build_defs b/python/requirements.build_defs index 5981c09..ed2ee92 100644 --- a/python/requirements.build_defs +++ b/python/requirements.build_defs @@ -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, diff --git a/python/test/requirements.txt b/python/test/requirements.txt index 37052f7..b55387b 100644 --- a/python/test/requirements.txt +++ b/python/test/requirements.txt @@ -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 \ No newline at end of file +attrs==18.1.0 # Allow comments after a dependency + +# Allow for a package with "extras" +passlib[argon2]