[FIX] use virtualenv command instead of cli
This commit is contained in:
parent
c069757168
commit
613eeb9d93
|
|
@ -36,8 +36,6 @@ pylint:
|
||||||
script:
|
script:
|
||||||
- source .venv/bin/activate
|
- source .venv/bin/activate
|
||||||
- pylint --version
|
- pylint --version
|
||||||
# - pylint --disable fixme ociedoo
|
|
||||||
# - pylint --disable fixme tests
|
|
||||||
|
|
||||||
pytest:
|
pytest:
|
||||||
stage: tests
|
stage: tests
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
import argparse
|
import argparse
|
||||||
import os
|
import os
|
||||||
import subprocess
|
|
||||||
|
|
||||||
from git_aggregator import main as gitaggregate_cmd
|
from git_aggregator import main as gitaggregate_cmd
|
||||||
from git_aggregator.utils import working_directory_keeper
|
from git_aggregator.utils import working_directory_keeper
|
||||||
|
|
@ -8,6 +7,7 @@ from jinja2 import Template
|
||||||
from loguru import logger
|
from loguru import logger
|
||||||
from plumbum import local
|
from plumbum import local
|
||||||
from plumbum.cmd import mkdir
|
from plumbum.cmd import mkdir
|
||||||
|
from virtualenv.run import cli_run as virtualenv_cmd
|
||||||
|
|
||||||
|
|
||||||
def ensure_folder_exists(folder_path, mode=False):
|
def ensure_folder_exists(folder_path, mode=False):
|
||||||
|
|
@ -72,11 +72,10 @@ def create_virtualenv(folder_path, python_version):
|
||||||
Create a virtual env named ``env`` in the ``folder_path`` folder
|
Create a virtual env named ``env`` in the ``folder_path`` folder
|
||||||
with the given ``python_version``.
|
with the given ``python_version``.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
with local.cwd(folder_path):
|
with local.cwd(folder_path):
|
||||||
logger.info(
|
logger.info(
|
||||||
"Create Virtual Env in %s with version %s"
|
"Create Virtual Env in %s with version %s"
|
||||||
% (folder_path, python_version)
|
% (folder_path, python_version)
|
||||||
)
|
)
|
||||||
subprocess.check_output(
|
virtualenv_cmd(["env", "--python", python_version])
|
||||||
["virtualenv", "env", "--python", python_version]
|
|
||||||
)
|
|
||||||
|
|
|
||||||
14
poetry.lock
generated
14
poetry.lock
generated
|
|
@ -134,7 +134,7 @@ toml = ["tomli"]
|
||||||
name = "distlib"
|
name = "distlib"
|
||||||
version = "0.3.4"
|
version = "0.3.4"
|
||||||
description = "Distribution utilities"
|
description = "Distribution utilities"
|
||||||
category = "dev"
|
category = "main"
|
||||||
optional = false
|
optional = false
|
||||||
python-versions = "*"
|
python-versions = "*"
|
||||||
|
|
||||||
|
|
@ -158,7 +158,7 @@ pipenv = ["pipenv"]
|
||||||
name = "filelock"
|
name = "filelock"
|
||||||
version = "3.4.1"
|
version = "3.4.1"
|
||||||
description = "A platform independent file lock."
|
description = "A platform independent file lock."
|
||||||
category = "dev"
|
category = "main"
|
||||||
optional = false
|
optional = false
|
||||||
python-versions = ">=3.6"
|
python-versions = ">=3.6"
|
||||||
|
|
||||||
|
|
@ -223,7 +223,7 @@ testing = ["pytest (>=6)", "pytest-checkdocs (>=2.4)", "pytest-flake8", "pytest-
|
||||||
name = "importlib-resources"
|
name = "importlib-resources"
|
||||||
version = "5.4.0"
|
version = "5.4.0"
|
||||||
description = "Read resources from Python packages"
|
description = "Read resources from Python packages"
|
||||||
category = "dev"
|
category = "main"
|
||||||
optional = false
|
optional = false
|
||||||
python-versions = ">=3.6"
|
python-versions = ">=3.6"
|
||||||
|
|
||||||
|
|
@ -346,7 +346,7 @@ pyparsing = ">=2.0.2,<3.0.5 || >3.0.5"
|
||||||
name = "platformdirs"
|
name = "platformdirs"
|
||||||
version = "2.4.0"
|
version = "2.4.0"
|
||||||
description = "A small Python module for determining appropriate platform-specific dirs, e.g. a \"user data dir\"."
|
description = "A small Python module for determining appropriate platform-specific dirs, e.g. a \"user data dir\"."
|
||||||
category = "dev"
|
category = "main"
|
||||||
optional = false
|
optional = false
|
||||||
python-versions = ">=3.6"
|
python-versions = ">=3.6"
|
||||||
|
|
||||||
|
|
@ -557,7 +557,7 @@ importlib_metadata = {version = ">=3.0,<5", markers = "python_version < \"3.8\""
|
||||||
name = "six"
|
name = "six"
|
||||||
version = "1.16.0"
|
version = "1.16.0"
|
||||||
description = "Python 2 and 3 compatibility utilities"
|
description = "Python 2 and 3 compatibility utilities"
|
||||||
category = "dev"
|
category = "main"
|
||||||
optional = false
|
optional = false
|
||||||
python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*"
|
python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*"
|
||||||
|
|
||||||
|
|
@ -651,7 +651,7 @@ socks = ["PySocks (>=1.5.6,!=1.5.7,<2.0)"]
|
||||||
name = "virtualenv"
|
name = "virtualenv"
|
||||||
version = "20.14.0"
|
version = "20.14.0"
|
||||||
description = "Virtual Python Environment builder"
|
description = "Virtual Python Environment builder"
|
||||||
category = "dev"
|
category = "main"
|
||||||
optional = false
|
optional = false
|
||||||
python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,>=2.7"
|
python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,>=2.7"
|
||||||
|
|
||||||
|
|
@ -701,7 +701,7 @@ testing = ["pytest (>=4.6)", "pytest-checkdocs (>=2.4)", "pytest-flake8", "pytes
|
||||||
[metadata]
|
[metadata]
|
||||||
lock-version = "1.1"
|
lock-version = "1.1"
|
||||||
python-versions = "^3.6"
|
python-versions = "^3.6"
|
||||||
content-hash = "cff9b335836283e1c1f9185ba1b575de62e19d3d6409257a03836f9a8cfaaaf5"
|
content-hash = "fbd32c0469f499827b4fd98ab355e0a83cf9c53606a59eb545b47f5029364d74"
|
||||||
|
|
||||||
[metadata.files]
|
[metadata.files]
|
||||||
aiocontextvars = [
|
aiocontextvars = [
|
||||||
|
|
|
||||||
|
|
@ -31,6 +31,7 @@ loguru = "^0.6"
|
||||||
plumbum = "^1.7"
|
plumbum = "^1.7"
|
||||||
single-source = "^0.3"
|
single-source = "^0.3"
|
||||||
git-aggregator = "^2.1"
|
git-aggregator = "^2.1"
|
||||||
|
virtualenv = "^20.14"
|
||||||
pyyaml = "5.4.1"
|
pyyaml = "5.4.1"
|
||||||
|
|
||||||
[tool.poetry.dev-dependencies]
|
[tool.poetry.dev-dependencies]
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user