Skip to content

Commit

Permalink
Try building on Windows
Browse files Browse the repository at this point in the history
- Use double quotes for find
- Call Python directly, without which
- Change how venvs are created in a more platform independent way
  • Loading branch information
atodorov committed Mar 22, 2020
1 parent cccc771 commit e35e70b
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 11 deletions.
1 change: 1 addition & 0 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ environment:
PYTHON: "C:\\Python36-x64"

matrix:
- MAKE: build
- MAKE: flake8
- MAKE: pylint
- MAKE: test
Expand Down
22 changes: 11 additions & 11 deletions tests/check-build
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,16 @@

# first clean up the local environment
echo "..... Clean up first"
find . -type f -name '*.pyc' -delete
find . -type f -name "*.pyc" -delete
find . -type d -name __pycache__ -delete
find . -type d -name '*.egg-info' | xargs rm -rf
rm -rf build/ .cache/ dist/ .eggs/ .tox/ .venv/
find . -type d -name "*.egg-info" | xargs rm -rf
rm -rf build/ .cache/ dist/ .eggs/ .tox/ .venv-*/


echo "..... Building PyPI packages for tcms-api"
set -e
$(which python) setup.py sdist >/dev/null
$(which python) setup.py bdist_wheel >/dev/null
python setup.py sdist >/dev/null
python setup.py bdist_wheel >/dev/null
set +e

# check rst formatting of README before building the package
Expand All @@ -40,22 +40,22 @@ fi
set -e

echo "..... Trying to install the new tarball inside a virtualenv"
virtualenv -q -p $(which python) .venv/test-tarball
source .venv/test-tarball/bin/activate
python -m venv .venv-test-tarball
source .venv-test-tarball/bin/activate
pip install --upgrade setuptools pip
pip install --no-binary :all: -f dist/ tcms-api
pip freeze | grep tcms-api
deactivate
rm -rf .venv/
rm -rf .venv-*/

echo "..... Trying to install the new wheel inside a virtualenv"
virtualenv -q -p $(which python) .venv/test-wheel
source .venv/test-wheel/bin/activate
python -m venv .venv-test-wheel
source .venv-test-wheel/bin/activate
pip install --upgrade setuptools pip
pip install kerberos
pip install --only-binary :all: -f dist/ tcms_api
pip freeze | grep tcms-api
deactivate
rm -rf .venv/
rm -rf .venv-*/

echo "..... PASS"

0 comments on commit e35e70b

Please sign in to comment.