Skip to content

Commit

Permalink
Merge 53c8c29 into cccc771
Browse files Browse the repository at this point in the history
  • Loading branch information
atodorov committed Mar 22, 2020
2 parents cccc771 + 53c8c29 commit bf6c057
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 8 deletions.
19 changes: 14 additions & 5 deletions appveyor.yml
Expand Up @@ -6,18 +6,27 @@ environment:
- MAKE: flake8
- MAKE: pylint
- MAKE: test
- MAKE: build

install:
# Prepend Python to the PATH of this build (this cannot be
# done from inside the powershell script as it would require to restart
# the parent CMD process).
- "SET PATH=%PYTHON%;%PYTHON%\\Scripts;%PATH%"
# Prepend Python to the PATH of this build (this cannot be done from inside
# the powershell script as it would require to restart the parent CMD process).
# cygwin64\bin contains all commands used by 'make build'
- "SET PATH=%PYTHON%;%PYTHON%\\Scripts;C:\\Users\\appveyor\\AppData\\Roaming\\Python\\Python36\\Scripts;C:\\cygwin64\\bin;%PATH%"

- "python --version"
- "python -m pip install --disable-pip-version-check --user --upgrade pip wheel"
- "python -m pip install coverage pylint flake8 twine winkerberos requests"

build: off

artifacts:
- path: 'dist\*.whl'
name: Python wheel for Windows
type: file

test_script:
- "C:\\cygwin64\\bin\\make %MAKE%"
- 'sed -i "s|\$(which python)|python|" tests/check-build'
- 'sed -i "s|bin/activate|Scripts/activate|" tests/check-build'
- 'sed -i "s|pip install kerberos||" tests/check-build'
- "make %MAKE%"
1 change: 1 addition & 0 deletions setup.py
Expand Up @@ -21,6 +21,7 @@ def get_version():
packages=['tcms_api'],
description='Python API for Kiwi',
long_description=LONG_DESCRIPTION,
long_description_content_type="text/x-rst",
maintainer='Kiwi TCMS',
maintainer_email='info@kiwitcms.org',
license='LGPLv2+',
Expand Down
9 changes: 6 additions & 3 deletions tests/check-build
Expand Up @@ -30,7 +30,10 @@ if [ "$matched_files" -gt "0" ]; then
echo "ERROR: .pyc files found in .tar.gz package"
exit 1
fi
matched_files=`unzip -t dist/tcms_api*.whl | grep -c "\.pyc"`
WHEEL_UNPACK_DIR=`mktemp -d`
wheel unpack --dest "$WHEEL_UNPACK_DIR" dist/tcms_api*.whl
matched_files=`find "$WHEEL_UNPACK_DIR" -type f | grep -c "\.pyc"`
rm -rf "$WHEEL_UNPACK_DIR"
if [ "$matched_files" -gt "0" ]; then
echo "ERROR: .pyc files found in wheel package"
exit 1
Expand All @@ -40,7 +43,7 @@ fi
set -e

echo "..... Trying to install the new tarball inside a virtualenv"
virtualenv -q -p $(which python) .venv/test-tarball
virtualenv -q .venv/test-tarball
source .venv/test-tarball/bin/activate
pip install --upgrade setuptools pip
pip install --no-binary :all: -f dist/ tcms-api
Expand All @@ -49,7 +52,7 @@ deactivate
rm -rf .venv/

echo "..... Trying to install the new wheel inside a virtualenv"
virtualenv -q -p $(which python) .venv/test-wheel
virtualenv -q .venv/test-wheel
source .venv/test-wheel/bin/activate
pip install --upgrade setuptools pip
pip install kerberos
Expand Down

0 comments on commit bf6c057

Please sign in to comment.