Skip to content

Commit

Permalink
backup
Browse files Browse the repository at this point in the history
  • Loading branch information
davidkhala committed Dec 4, 2024
1 parent 63afd4b commit 3a7a426
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 3 deletions.
11 changes: 11 additions & 0 deletions poetry/poetry.ps1 → poetry/admin.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,22 @@ function Install-Poetry
poetry --version

}
function Clear-venv{
# keep the folder
Get-ChildItem $env:LOCALAPPDATA\pypoetry\Cache\virtualenvs | Remove-Item -Recurse -Force
}
function Uninstall-Poetry
{
Clear-venv

(Invoke-WebRequest -Uri https://install.python-poetry.org -UseBasicParsing).Content | py - --uninstall
}
function Find-Poetry
{
Get-Command poetry
}
function Configure
{
# TODO issue #7
code $env:APPDATA/pypoetry/venv/pyvenv.cfg
}
4 changes: 3 additions & 1 deletion poetry/admin.sh
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
set -e
install() {
curl -sSL https://install.python-poetry.org | python3 -
# https://python-poetry.org/docs/main/#enable-tab-completion-for-bash-fish-or-zsh
poetry completions bash >>~/.bash_completion
}
uninstall() {
curl -sSL https://install.python-poetry.org | python3 - --uninstall
}
upgrade() {
poetry self update
}
"$@"
"$@"
4 changes: 2 additions & 2 deletions poetry/poetry.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@ set -e
update() {
poetry update --sync
}
install(){
install() {
poetry install --no-root
}
add() {
# adds required packages to your pyproject.toml and installs them.
poetry add "$@"
}
add-dev(){
add-dev() {
poetry add -G dev "$@"
}
clean-venv() {
Expand Down

0 comments on commit 3a7a426

Please sign in to comment.