mirror of
https://github.com/jupyterhub/the-littlest-jupyterhub.git
synced 2025-12-18 21:54:05 +08:00
Add option to install requirements.txt file on install
Also add docs about --admin option Refer #49
This commit is contained in:
@@ -66,3 +66,21 @@ def test_ensure_pip_packages(prefix):
|
||||
'-c',
|
||||
'import numpy'
|
||||
])
|
||||
|
||||
|
||||
def test_ensure_pip_requirements(prefix):
|
||||
"""
|
||||
Test installing pip packages with requirements.txt in conda environment
|
||||
"""
|
||||
conda.ensure_conda_env(prefix)
|
||||
conda.ensure_conda_packages(prefix, ['pip'])
|
||||
with tempfile.NamedTemporaryFile() as f:
|
||||
# Sample small package to test
|
||||
f.write('there'.encode())
|
||||
f.flush()
|
||||
conda.ensure_pip_requirements(prefix, f.name)
|
||||
subprocess.check_call([
|
||||
os.path.join(prefix, 'bin', 'python'),
|
||||
'-c',
|
||||
'import there'
|
||||
])
|
||||
|
||||
Reference in New Issue
Block a user