Skip to content

Commit

Permalink
feat: Update postinst script to recommend installing python-tgpt[cli]
Browse files Browse the repository at this point in the history
fix: Simplify postrm script by removing unnecessary file deletion logic
patch: Add suggestion to run pytgpt from source in postrm script
  • Loading branch information
Simatwa committed Nov 10, 2024
1 parent 0d1b6da commit 0f8d7a4
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 21 deletions.
2 changes: 1 addition & 1 deletion assets/deb/DEBIAN/postinst
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@

ln -s /usr/lib/pytgpt/pytgpt /usr/bin/pytgpt

echo "To get the most out of this package, install it from pypi <pip install python-tgpt>"
echo "To get the most out of this package, install it from pypi <pip install python-tgpt[cli]>"
echo "Submit any bug at https://github.com/Simatwa/python-tgpt/issues/new/choose"
18 changes: 1 addition & 17 deletions assets/deb/DEBIAN/postrm
Original file line number Diff line number Diff line change
@@ -1,21 +1,5 @@
#!/bin/bash

FILE_LIST=/usr/lib/pytgpt/entries.txt

if [ -f "$FILE_LIST" ]; then
while read -r ENTRY; do
if [ -d "$ENTRY" ]; then
rm -rf "$ENTRY"
elif [ -f "$ENTRY" ]; then
rm -f "$ENTRY"
else
echo ""
fi
done < "$FILE_LIST"
else
echo "The file list $FILE_LIST does not exist. Nothing to do."
fi

rm /usr/bin/pytgpt

echo "You might want to run pytgpt from source - <pip install python-tgpt[cli]>
echo "Submit any bug at <https://github.com/Simatwa/python-tgpt/issues/new>"
17 changes: 17 additions & 0 deletions assets/deb/DEBIAN/prerm
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/bin/bash

FILE_LIST=/usr/lib/pytgpt/entries.txt

if [ -f "$FILE_LIST" ]; then
while read -r ENTRY; do
if [ -d "$ENTRY" ]; then
rm -rf "$ENTRY"
elif [ -f "$ENTRY" ]; then
rm -f "$ENTRY"
else
echo ""
fi
done < "$FILE_LIST"
else
echo "The file list $FILE_LIST does not exist. Nothing to do."
fi
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@

setup(
name="python-tgpt",
version="0.7.8",
version="0.7.9",
license="MIT",
author="Smartwa",
maintainer="Smartwa",
Expand Down
3 changes: 1 addition & 2 deletions src/pytgpt/auto/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ def __init__(
exclude(list[str], optional): List of providers to be excluded. Defaults to [].
"""
self.provider: Union[
OPENGPT, KOBOLDAI, PHIND, LLAMA2, BLACKBOXAI, PERPLEXITY, GPT4FREE
OPENGPT, KOBOLDAI, PHIND, BLACKBOXAI, PERPLEXITY, GPT4FREE
] = None
self.provider_name: str = None
self.is_conversation = is_conversation
Expand Down Expand Up @@ -266,7 +266,6 @@ def __init__(
AsyncOPENGPT,
AsyncKOBOLDAI,
AsyncPHIND,
AsyncLLAMA2,
AsyncBLACKBOXAI,
AsyncGPT4FREE,
] = None
Expand Down

0 comments on commit 0f8d7a4

Please sign in to comment.