a
This commit is contained in:
parent
294d7790fd
commit
15e3d10d0b
8 changed files with 6 additions and 4 deletions
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -1,5 +1,7 @@
|
|||
import subprocess
|
||||
import inspect
|
||||
import os
|
||||
|
||||
from dataclasses import dataclass
|
||||
from abc import ABC
|
||||
from enum import Enum
|
||||
|
@ -82,13 +84,12 @@ class PipenvOperation(object):
|
|||
|
||||
@staticmethod
|
||||
def install(path=".", package_name=None):
|
||||
pip_install_options = "PIP_INSTALL_OPTION=\"-- --jobs=6\""
|
||||
if package_name:
|
||||
command = [pip_install_options, "pipenv", "install", package_name]
|
||||
command = f"pipenv install {package_name}"
|
||||
else:
|
||||
command = [pip_install_options, "pipenv", "install"]
|
||||
command = f"pipenv install"
|
||||
try:
|
||||
output = subprocess.check_output(command, cwd=path)
|
||||
output = subprocess.check_output(command.split(), cwd=path, env={**os.environ, "PIP_INSTALL_OPTION": "-- --jobs=8"})
|
||||
except subprocess.CalledProcessError as e:
|
||||
return Result(e, ResultType.failure, inspect.currentframe().f_code.co_name)
|
||||
else:
|
||||
|
|
1
ucloud-api
Submodule
1
ucloud-api
Submodule
|
@ -0,0 +1 @@
|
|||
Subproject commit 9aeb05987bd1b84e7ac851ce8b84f31647e436bd
|
Loading…
Reference in a new issue