a
This commit is contained in:
parent
b1fe48c80f
commit
7c0ccebeb5
6 changed files with 4 additions and 7 deletions
|
|
@ -70,5 +70,4 @@ def setup(path, auth_name, auth_seed, auth_realm,
|
||||||
)
|
)
|
||||||
shutil.copytree(src=os.path.join(repo_name, "etcd3_wrapper"),
|
shutil.copytree(src=os.path.join(repo_name, "etcd3_wrapper"),
|
||||||
dst=os.path.join(repo_name, "ucloud_common", "etcd3_wrapper"))
|
dst=os.path.join(repo_name, "ucloud_common", "etcd3_wrapper"))
|
||||||
op.add(PipenvOperation.create, path=repo_name, site_packages=True)
|
|
||||||
op.add(PipenvOperation.install, path=repo_name)
|
op.add(PipenvOperation.install, path=repo_name)
|
||||||
|
|
|
||||||
|
|
@ -47,7 +47,6 @@ def setup(path, base_dir, file_prefix, etcd_url, etcd_password):
|
||||||
url="https://code.ungleich.ch/ahmedbilal/etcd3_wrapper",
|
url="https://code.ungleich.ch/ahmedbilal/etcd3_wrapper",
|
||||||
)
|
)
|
||||||
|
|
||||||
op_result.add(PipenvOperation.create, path=repo_name, site_packages=True)
|
|
||||||
op_result.add(PipenvOperation.install, path=repo_name)
|
op_result.add(PipenvOperation.install, path=repo_name)
|
||||||
|
|
||||||
# Write Crontab entry
|
# Write Crontab entry
|
||||||
|
|
|
||||||
|
|
@ -82,10 +82,11 @@ class PipenvOperation(object):
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def install(path=".", package_name=None):
|
def install(path=".", package_name=None):
|
||||||
|
pip_install_options = "PIP_INSTALL_OPTION=\"-- --jobs=6\""
|
||||||
if package_name:
|
if package_name:
|
||||||
command = f"pipenv install {package_name}"
|
command = f"{pip_install_options} pipenv install {package_name}"
|
||||||
else:
|
else:
|
||||||
command = f"pipenv install"
|
command = f"{pip_install_options} pipenv install"
|
||||||
try:
|
try:
|
||||||
output = subprocess.check_output(command.split(), cwd=path)
|
output = subprocess.check_output(command.split(), cwd=path)
|
||||||
except subprocess.CalledProcessError as e:
|
except subprocess.CalledProcessError as e:
|
||||||
|
|
|
||||||
|
|
@ -61,5 +61,4 @@ def setup(path, ssh_username, ssh_key_path, ssh_key_pass, etcd_url, etcd_passwor
|
||||||
shutil.copytree(src=os.path.join(repo_name, "etcd3_wrapper"),
|
shutil.copytree(src=os.path.join(repo_name, "etcd3_wrapper"),
|
||||||
dst=os.path.join(repo_name, "ucloud_common", "etcd3_wrapper"))
|
dst=os.path.join(repo_name, "ucloud_common", "etcd3_wrapper"))
|
||||||
|
|
||||||
op_result.add(PipenvOperation.create, path=repo_name, site_packages=True)
|
|
||||||
op_result.add(PipenvOperation.install, path=repo_name)
|
op_result.add(PipenvOperation.install, path=repo_name)
|
||||||
|
|
|
||||||
|
|
@ -46,7 +46,6 @@ def setup(path, base_dir, etcd_url, etcd_password):
|
||||||
url="https://code.ungleich.ch/ahmedbilal/etcd3_wrapper",
|
url="https://code.ungleich.ch/ahmedbilal/etcd3_wrapper",
|
||||||
)
|
)
|
||||||
|
|
||||||
op_result.add(PipenvOperation.create, path=repo_name, site_packages=True)
|
|
||||||
op_result.add(PipenvOperation.install, path=repo_name)
|
op_result.add(PipenvOperation.install, path=repo_name)
|
||||||
|
|
||||||
# Write Crontab entry
|
# Write Crontab entry
|
||||||
|
|
|
||||||
2
init.sh
2
init.sh
|
|
@ -24,7 +24,7 @@ pip2 install --upgrade pip
|
||||||
# For CEPH
|
# For CEPH
|
||||||
pip2 install prettytable
|
pip2 install prettytable
|
||||||
|
|
||||||
pip3 install pipenv py3-grpcio
|
pip3 install pipenv
|
||||||
|
|
||||||
pipenv install
|
pipenv install
|
||||||
pipenv shell
|
pipenv shell
|
||||||
Loading…
Add table
Add a link
Reference in a new issue