diff --git a/.travis.yml b/.travis.yml index d01b7b6..265c8da 100644 --- a/.travis.yml +++ b/.travis.yml @@ -22,8 +22,9 @@ before_script: - sudo rm -rf /etc/mysql - sudo bash -c 'echo example.com > /etc/hostname' - unset LANG + - sudo apt-get update --allow-releaseinfo-change -qq - sudo apt-get -qq purge mysql* graphviz* redis* - - sudo apt-get install -qq git python3-setuptools python3-dev python3-apt ccze tree python3-wheel python3-pip + - sudo apt-get install -qq git python3-setuptools python3-dev python3-apt ccze tree - sudo apt-get -qq autoremove --purge @@ -37,7 +38,6 @@ script: - lsb_release -a - sudo bash -c 'echo -e "[user]\n\tname = abc\n\temail = root@localhost.com" > /home/travis/.gitconfig' - sudo echo "Travis Banch = $TRAVIS_BRANCH" - - sudo python3 setup.py sdist bdist_wheel >> install.log - sudo time bash install --travis -b "$TRAVIS_BRANCH" - sudo time bash tests/travis.sh - sudo wo update --travis \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index d420606..da616ff 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,7 +16,6 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), #### Changed -- [CORE] WordOps is now installed from PyPI using pip [WordOps](https://pypi.org/project/wordops/) - [STACK] New Nginx package built with OpenSSL_1.1.1d and the latest ngx_brotli module #### Fixed diff --git a/install b/install index f5313c0..e22df35 100755 --- a/install +++ b/install @@ -452,23 +452,38 @@ wo_git_config() { } -# WordOps install -wo_install() { - - python3 -m pip install --upgrade pip - python3 -m pip install --upgrade wordops - cp -rf /usr/local/lib/python3.*/dist-packages/etc/* /etc/ - cp -rf /usr/local/lib/python3.*/dist-packages/usr/* /usr/ - +# Download WordOps +wo_download() { + rm -f /etc/bash_completion.d/wo_auto.rc + rm -rf /var/lib/wo/tmp/WordOps-* + if [ -z "$wo_version" ]; then + curl -sL https://github.com/WordOps/WordOps/archive/${wo_branch}.tar.gz | tar -I pigz -xf - -C /var/lib/wo/tmp + mv "/var/lib/wo/tmp/WordOps-$wo_branch" /var/lib/wo/tmp/WordOps-install + else + curl -sL https://github.com/WordOps/WordOps/archive/v${wo_version}.tar.gz | tar -I pigz -xf - -C /var/lib/wo/tmp + mv "/var/lib/wo/tmp/WordOps-$wo_version" /var/lib/wo/tmp/WordOps-install + fi } # WordOps install -wo_travis_install() { +wo_install() { - python3 -m pip install --upgrade pip - python3 -m pip install --upgrade dist/*.whl - cp -rf /usr/local/lib/python3.*/dist-packages/etc/* /etc/ - cp -rf /usr/local/lib/python3.*/dist-packages/usr/* /usr/ + cd /var/lib/wo/tmp/WordOps-install || exit 1 + python3 setup.py install + +} + +# Clone Github repository if it doesn't exist +wo_install_travis() { + + if [ "$wo_force_install" = "y" ]; then + [ ! -f "$HOME/.gitconfig" ] && { bash -c 'echo -e "[user]\n\tname = $USER\n\temail = root@$HOSTNAME.local" > $HOME/.gitconfig'; } + fi + + if [ -f "$HOME/.gitconfig" ]; then + # install and redirect log to not print python package install + python3 setup.py install + fi } @@ -784,6 +799,7 @@ else # skip steps if travis if [ -z "$wo_travis" ]; then _run wo_dist_upgrade + _run wo_download "Downloading WordOps" wo_git_config _run wo_install "Installing WordOps" else diff --git a/setup.py b/setup.py index c47ef64..269b8a9 100644 --- a/setup.py +++ b/setup.py @@ -4,7 +4,7 @@ import os from setuptools import find_packages, setup -with open("README.md", "r") as fh: +with open("README.md", "r", encoding="utf-8") as fh: LONG = fh.read() conf = []