mirror of
https://github.com/Grasscutters/mitmproxy.git
synced 2024-11-22 15:37:45 +00:00
fix appveyor
This commit is contained in:
parent
f69972d13d
commit
a4fde737b1
@ -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
|
||||
}
|
||||
|
||||
|
@ -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``,
|
||||
|
16
dev.bat
16
dev.bat
@ -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.
|
16
dev.ps1
Normal file
16
dev.ps1
Normal file
@ -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.
|
||||
|
||||
"@
|
Loading…
Reference in New Issue
Block a user