handle os upgrade, fix tweepy setup master
authorIan Kelling <iank@fsf.org>
Tue, 3 Sep 2024 07:04:45 +0000 (03:04 -0400)
committerIan Kelling <iank@fsf.org>
Tue, 3 Sep 2024 07:04:45 +0000 (03:04 -0400)
README
pdt.sh

diff --git a/README b/README
index 1e403d9c14cb6397eee0b2492a9dc623222e5cdf..b42aee98974180824148148be4346fe3bc8c801d 100644 (file)
--- a/README
+++ b/README
@@ -29,5 +29,8 @@ Main usage: source pdt.sh, run pdt-setup one time, then usually just run
 pdt to do posts. The documentation for each function is within the
 pdt.sh file. After an update via git pull, run pdt-stup again.
 
+If you've upgraded your OS, and have a new version of python, you may need to
+rm -rf ~/.local ~/src/tweepy/venv ~/src/toot/venv, and run pdt-setup.
+
 Patches welcome, email them to iank@fsf.org . If you aren't sure how
 to send a patch, see https://git-send-email.io/
diff --git a/pdt.sh b/pdt.sh
index 9ac3107c44d137fbb4cabd32cd73ff62dddba53e..d1ae6eb42f6d79282f1135f163f41ab39f057b12 100644 (file)
--- a/pdt.sh
+++ b/pdt.sh
@@ -395,7 +395,7 @@ pdt-toot-setup() {
 
   rm -rf ~/src/toot
   mkdir -p ~/src/toot
-  # subshell for cd
+  # subshell for cd & source without deactivate
   (
     cd ~/src/toot
     # on t11, got myself into a situation where when doing pip install virtualenv,
@@ -482,6 +482,15 @@ pdt-pip-setup() {
 
 # generally only meant to be called internally from pdt-setup
 pdt-twitter-setup() {
+  if [[ ! -e ~/src/tweepy ]]; then
+    mkdir -p ~/src
+    cd ~/src
+    git clone https://github.com/tweepy/tweepy.git
+    cd tweepy
+    # just a commit we happened to use and is working
+    git checkout f32d12dbddbd877470446657812a10a04292d0c9
+  fi
+  # subshell so it undoes the source command.
   (
     cd ~/src/tweepy
     python3 -m virtualenv -p python3 venv