run pip from python
This commit is contained in:
parent
f990897cad
commit
fc5b997288
2 changed files with 20 additions and 10 deletions
|
@ -53,6 +53,25 @@ def install_commands(path: str) -> None:
|
|||
(user / f"{COMMANDS_PREFIX}{command}").symlink_to(path)
|
||||
|
||||
|
||||
def install_python_packages() -> None:
|
||||
step("Install Python packages")
|
||||
log.info("pip")
|
||||
run("pip", "install", "--upgrade", "pip")
|
||||
split()
|
||||
packages = [
|
||||
"mypy",
|
||||
"pelican",
|
||||
"pytest",
|
||||
"ruff",
|
||||
"sphinx",
|
||||
"sphinx-rtd-theme",
|
||||
"twine",
|
||||
]
|
||||
for package in packages:
|
||||
log.info(package)
|
||||
run("pip", "install", *packages)
|
||||
|
||||
|
||||
def list_environment_variables() -> None:
|
||||
step("List environment variables")
|
||||
for variable, value in sorted(projects.environment.items()):
|
||||
|
@ -73,6 +92,7 @@ def main(main: str) -> None:
|
|||
clone_project_branch()
|
||||
set_ssh()
|
||||
install_commands(main)
|
||||
install_python_packages()
|
||||
else:
|
||||
function = getattr(cmd, name.replace("-", "_"))
|
||||
function(*arguments)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue