Skip to content

Commit

Permalink
Install Pywikibot from PyPI (#135)
Browse files Browse the repository at this point in the history
* fix: use pywikibot installed from PyPI

* feat: added pywikibot to the requirements.txt

* feat: updated dockerfile to install pywikibot from pip

* fix: no mkdir required
  • Loading branch information
harshkhandeparkar committed Apr 20, 2024
1 parent a0fed40 commit 31de387
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 8 deletions.
6 changes: 1 addition & 5 deletions jobs/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,11 @@ RUN curl -fsSLO "$SUPERCRONIC_URL" \
&& ln -s "/usr/local/bin/${SUPERCRONIC}" /usr/local/bin/supercronic

WORKDIR /root
RUN wget -qO- https://tools.wmflabs.org/pywikibot/core.tar.gz | tar xz \
&& mv core pywikibot

COPY requirements.txt ./
RUN pip install -qr requirements.txt

COPY pywikibot/user-config.py pywikibot/user-password.py pywikibot/
COPY pywikibot/metakgp_family.py pywikibot/pywikibot/families/
COPY pywikibot/scripts/ pywikibot/scripts/
COPY pywikibot ./pywikibot

COPY crontab update_top_trending.sh MetaMaint.sh update_spam_denylist.sh logrotate.conf ./
RUN chmod 644 logrotate.conf && groupadd -g 999 mysql && useradd mysql -u 999 -g 999
Expand Down
4 changes: 2 additions & 2 deletions jobs/MetaMaint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ echo "MetaMaint - Update MetaKGP demo day project"

cd /root/pywikibot
export METAKGP_BOT_NAME=batman
timeout 10s python pwb.py login
timeout 30s python pwb.py MetaMaint
timeout 10s pwb login
timeout 30s pwb MetaMaint
3 changes: 2 additions & 1 deletion jobs/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
requests
google-api-python-client
oauth2client
dropbox
dropbox
pywikibot

0 comments on commit 31de387

Please sign in to comment.