diff options
author | Pedro Henrique | 2019-05-02 12:14:10 -0300 |
---|---|---|
committer | Pedro Henrique | 2019-05-02 12:59:10 -0300 |
commit | 5ed1576d71c52e936600e68b439888cd7d239c91 (patch) | |
tree | 62e469b63a7ba53b24af8b9bd3ff254723767229 /overgrive.install | |
parent | 42561fcd8afdacfdf93704c5b3b459309beb4386 (diff) | |
download | aur-5ed1576d71c52e936600e68b439888cd7d239c91.tar.gz |
Update version
Diffstat (limited to 'overgrive.install')
-rw-r--r-- | overgrive.install | 27 |
1 files changed, 22 insertions, 5 deletions
diff --git a/overgrive.install b/overgrive.install index eb6930ac58f2..4b54581c8fa4 100644 --- a/overgrive.install +++ b/overgrive.install @@ -1,15 +1,32 @@ post_install() { - virtualenv2 --system-site-packages /opt/thefanclub/overgrive/venv - /opt/thefanclub/overgrive/venv/bin/python2 -m pip install --upgrade google-api-python-client - /opt/thefanclub/overgrive/venv/bin/python2 -m pip install --upgrade oauth2client - sudo glib-compile-schemas /usr/share/glib-2.0/schemas + python3 -m venv --system-site-packages /opt/thefanclub/overgrive/venv + + # Install Google API Client for Python3 (for the virtualenv) + /opt/thefanclub/overgrive/venv/bin/pip3 install --upgrade google-api-python-client + + # Recomplie Schemas for good measure + if [ -f /usr/bin/glib-compile-schemas ] + then + /usr/bin/glib-compile-schemas /usr/share/glib-2.0/schemas/ + fi + + # Choose cpython interpreter for overgrive and copy correct compiled version and remove folder + if [ -d /opt/thefanclub/overgrive/__pycache__ ] + then + cp /opt/thefanclub/overgrive/__pycache__/$(ls /opt/thefanclub/overgrive/__pycache__ | grep $(python3 -V | cut -d' ' -f2 | cut -d'.' -f1-2 | sed 's/\.//g')) /opt/thefanclub/overgrive/overgrive + rm -R /opt/thefanclub/overgrive/__pycache__ + chmod 0755 /opt/thefanclub/overgrive/overgrive + fi } + post_upgrade() { post_install } + post_remove() { sudo rm -rf /opt/thefanclub/overgrive/ - if [ -z "$(ls -A /opt/thefanclub/)" ]; then + if [ -z "$(ls -A /opt/thefanclub/)" ] + then sudo rmdir /opt/thefanclub/ fi }
\ No newline at end of file |