Switch our python package management solution to poetry.

Mainly because it has better support for installing the packages from
different python versions.

It also has better dependency resolver than Pipenv. And supports modern
standard for python dependency management. This includes usage of
pyproject.toml for project specific configuration instead of per
tool conf files. See following links for details:
 https://pip.pypa.io/en/stable/reference/build-system/pyproject-toml/
 https://www.python.org/dev/peps/pep-0518/
This commit is contained in:
Dmitry Rodionov
2022-01-19 13:16:51 +03:00
committed by Dmitry Rodionov
parent e209764877
commit 5f5a11525c
18 changed files with 2164 additions and 1160 deletions

View File

@@ -38,7 +38,7 @@ def rustfmt(fix_inplace: bool = False, no_color: bool = False) -> str:
def yapf(fix_inplace: bool) -> str:
cmd = "pipenv run yapf --recursive"
cmd = "poetry run yapf --recursive"
if fix_inplace:
cmd += " --in-place"
else:
@@ -47,7 +47,7 @@ def yapf(fix_inplace: bool) -> str:
def mypy() -> str:
return "pipenv run mypy"
return "poetry run mypy"
def get_commit_files() -> List[str]:
@@ -72,7 +72,7 @@ def check(name: str, suffix: str, cmd: str, changed_files: List[str], no_color:
print("Please inspect the output below and run make fmt to fix automatically.")
if suffix == ".py":
print("If the output is empty, ensure that you've installed Python tooling by\n"
"running 'pipenv install --dev' in the current directory (no root needed)")
"running './scripts/pysync' in the current directory (no root needed)")
print()
print(res.stdout.decode())
exit(1)