diff --git a/.appveyor.yml b/.appveyor.yml index 5e487ff6b..71840f1b4 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -4,9 +4,9 @@ build: off # Not a C# project environment: matrix: - PYTHON: "C:\\Python27" - TOXENV: "py27-ci" + TOXENV: "py27" - PYTHON: "C:\\Python35" - TOXENV: "py35-ci-win" + TOXENV: "py35" SNAPSHOT_HOST: secure: NeTo57s2rJhCd/mjKHetXVxCFd3uhr8txnjnAXD1tUI= @@ -22,18 +22,18 @@ install: - "python -m pip install --disable-pip-version-check -U pip" - "pip install -U tox" -before_test: - - "tox -e lint" - test_script: - "tox" deploy_script: ps: | - if(($Env:APPVEYOR_REPO_BRANCH -match "master") -or ($Env:APPVEYOR_REPO_TAG -match "true")) { + if( + ($Env:TOXENV -match "py27") -and + (($Env:APPVEYOR_REPO_BRANCH -match "simplify-tox") -or ($Env:APPVEYOR_REPO_TAG -match "true")) + ) { pip install -U virtualenv - .\dev.bat - python .\release\rtool.py bdist + .\dev.ps1 + cmd /c "python .\release\rtool.py bdist 2>&1" python .\release\rtool.py upload-snapshot --bdist } diff --git a/README.rst b/README.rst index 0a890582e..525847194 100644 --- a/README.rst +++ b/README.rst @@ -60,7 +60,7 @@ here_). Then do the following: git clone https://github.com/mitmproxy/mitmproxy.git cd mitmproxy - ./dev.sh + ./dev.sh # powershell .\dev.ps1 on Windows The *dev* script will create a virtualenv environment in a directory called @@ -74,7 +74,7 @@ mitmproxy test suite: .. code-block:: text - . venv/bin/activate # venv\Scripts\activate.bat on Windows + . venv/bin/activate # venv\Scripts\activate on Windows py.test Note that the main executables for the project - ``mitmdump``, ``mitmproxy``, diff --git a/dev.bat b/dev.bat deleted file mode 100644 index fe0824e01..000000000 --- a/dev.bat +++ /dev/null @@ -1,16 +0,0 @@ -@echo off -set VENV=.\venv - -virtualenv %VENV% --always-copy -if %errorlevel% neq 0 exit /b %errorlevel% -call %VENV%\Scripts\activate.bat -if %errorlevel% neq 0 exit /b %errorlevel% -python -m pip install --disable-pip-version-check -U pip -if %errorlevel% neq 0 exit /b %errorlevel% -pip install -r requirements.txt -if %errorlevel% neq 0 exit /b %errorlevel% - -echo. -echo * Created virtualenv environment in %VENV%. -echo * Installed all dependencies into the virtualenv. -echo * Activated virtualenv environment. diff --git a/dev.ps1 b/dev.ps1 new file mode 100644 index 000000000..7f329e8f9 --- /dev/null +++ b/dev.ps1 @@ -0,0 +1,16 @@ +$ErrorActionPreference = "Stop" +$VENV = ".\venv" + +virtualenv $VENV --always-copy +& $VENV\Scripts\activate.ps1 + +python -m pip install --disable-pip-version-check -U pip +cmd /c "pip install -r requirements.txt 2>&1" + +echo @" + + * Created virtualenv environment in $VENV. + * Installed all dependencies into the virtualenv. + * Activated virtualenv environment. + +"@ \ No newline at end of file