Skip to content
This repository has been archived by the owner on Jun 8, 2022. It is now read-only.

Support Pipenv #35

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
16 changes: 11 additions & 5 deletions build.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,12 +136,18 @@ def create_zip_file(source_dir, target_file):
# Install dependencies into the temporary directory.
if runtime.startswith('python'):
requirements = os.path.join(temp_dir, 'requirements.txt')
if os.path.exists(requirements):
pipfile = os.path.join(temp_dir, 'Pipfile')
requirements_exists = os.path.exists(requirements)
pipfile_exists = os.path.exists(pipfile)
if requirements_exists or pipfile_exists:
with cd(temp_dir):
if runtime.startswith('python3'):
pip_command = 'pip3'
else:
pip_command = 'pip2'
if requirements_exists:
if runtime.startswith('python3'):
pip_command = 'pip3'
else:
pip_command = 'pip2'
elif pipfile_exists:
pip_command = 'pipenv'
run(
pip_command,
'install',
Expand Down