finish Azure Pipelines config
This commit is contained in:
parent
f81c229f63
commit
7c3d088865
|
@ -1,36 +0,0 @@
|
|||
environment:
|
||||
global:
|
||||
PYTHON: C:\Python37-x64
|
||||
CIBW_TEST_REQUIRES: pytest
|
||||
CIBW_TEST_COMMAND: pytest {project}\tests
|
||||
|
||||
init:
|
||||
- set PATH=%PYTHON%\Scripts;%PYTHON%;%PATH%
|
||||
|
||||
install:
|
||||
- python -m pip install -U pip
|
||||
- python -m pip install -U cibuildwheel
|
||||
|
||||
build_script:
|
||||
- python -m cibuildwheel --output-dir dist
|
||||
|
||||
artifacts:
|
||||
- path: dist\*.whl
|
||||
|
||||
deploy:
|
||||
provider: S3
|
||||
access_key_id:
|
||||
secure: "KP/pEANcoiWbT6ie9cwmMseUN2Z/VZEmcN2kAlA8rdY="
|
||||
secret_access_key:
|
||||
secure: "kaYMEi5krUfR1pKRyXbuL7Lkxwrv6T6qwfhl0bE0BPqKCSOU1REx23OYz97UtAGq"
|
||||
bucket: pallets-wheels
|
||||
region: us-east-1
|
||||
folder: markupsafe
|
||||
|
||||
branches:
|
||||
only:
|
||||
- master
|
||||
- /^\d+(\.\d+)*(\.x)?$/
|
||||
|
||||
cache:
|
||||
- '%LOCALAPPDATA%\pip\Cache'
|
|
@ -1,128 +1,85 @@
|
|||
trigger:
|
||||
- master
|
||||
|
||||
jobs:
|
||||
- job: TestMarkupSafe
|
||||
variables:
|
||||
vmImage: ubuntu-latest
|
||||
python.version: '3.7'
|
||||
TOXENV: 'py,codecov'
|
||||
python.architecture: 'x64'
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
Python37Linux:
|
||||
python.version: '3.7'
|
||||
Python37Windows:
|
||||
python.version: '3.7'
|
||||
vmImage: 'windows-latest'
|
||||
Python37Mac:
|
||||
python.version: '3.7'
|
||||
vmImage: 'macos-latest'
|
||||
Pypy3Linux:
|
||||
python.version: 'pypy3'
|
||||
Python36Linux:
|
||||
python.version: '3.6'
|
||||
Python35Linux:
|
||||
python.version: '3.5'
|
||||
Python27Linux:
|
||||
python.version: '2.7'
|
||||
Python27Windows:
|
||||
python.version: '2.7'
|
||||
vmImage: 'windows-latest'
|
||||
StylecheckAndDocs:
|
||||
TOXENV: stylecheck,docs-html
|
||||
|
||||
pool:
|
||||
vmImage: $[ variables.vmImage ]
|
||||
|
||||
steps:
|
||||
- task: UsePythonVersion@0
|
||||
inputs:
|
||||
versionSpec: $(python.version)
|
||||
architecture: $(python.architecture)
|
||||
|
||||
- script: pip install -U tox
|
||||
displayName: 'Install tox'
|
||||
|
||||
- script: tox
|
||||
displayName: 'Run tox'
|
||||
|
||||
- job: BuildWheels
|
||||
dependsOn: TestMarkupSafe
|
||||
|
||||
variables:
|
||||
vmImage: ubuntu-latest
|
||||
python.version: '3.7'
|
||||
TOXENV: 'py,codecov'
|
||||
python.architecture: 'x64'
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
Python37Linux:
|
||||
platform: 'linux'
|
||||
Python37Mac:
|
||||
vmImage: 'macos-latest'
|
||||
platform: 'macos'
|
||||
Python37Windows:
|
||||
vmImage: 'windows-latest'
|
||||
platform: 'windows'
|
||||
Python37Windows32bit:
|
||||
vmImage: 'windows-latest'
|
||||
python.architecture: 'x86'
|
||||
platform: 'windows'
|
||||
Python36Windows:
|
||||
vmImage: 'windows-latest'
|
||||
python.version: '3.6'
|
||||
platform: 'windows'
|
||||
Python36Windows32bit:
|
||||
vmImage: 'windows-latest'
|
||||
python.version: '3.6'
|
||||
python.architecture: 'x86'
|
||||
platform: 'windows'
|
||||
Python35Windows:
|
||||
vmImage: 'windows-latest'
|
||||
python.version: '3.5'
|
||||
platform: 'windows'
|
||||
Python35Windows32bit:
|
||||
vmImage: 'windows-latest'
|
||||
python.version: '3.5'
|
||||
python.architecture: 'x86'
|
||||
platform: 'windows'
|
||||
Python27Windows:
|
||||
vmImage: 'windows-latest'
|
||||
platform: 'windows'
|
||||
python.version: '2.7'
|
||||
Python27Windows32bit:
|
||||
vmImage: 'windows-latest'
|
||||
platform: 'windows'
|
||||
python.version: '2.7'
|
||||
python.architecture: 'x86'
|
||||
|
||||
pool:
|
||||
vmImage: $[ variables.vmImage ]
|
||||
|
||||
steps:
|
||||
- task: UsePythonVersion@0
|
||||
inputs:
|
||||
versionSpec: $(python.version)
|
||||
architecture: $(python.architecture)
|
||||
|
||||
- script: choco install vcpython27 -f -y
|
||||
displayName: Install Visual C++ for Python 2.7
|
||||
condition: and(eq(variables['platform'], 'windows'), eq(variables['python.version'], '2.7'))
|
||||
|
||||
- bash: |
|
||||
python -m pip install --upgrade pip
|
||||
# TODO: change this back to `pip install cibuildwheel` when `azure-windows` PR is merged
|
||||
pip install https://github.com/joerick/cibuildwheel/archive/azure-windows.zip
|
||||
cibuildwheel --platform $(platform) --output-dir wheelhouse .
|
||||
displayName: Run cibuildwheel
|
||||
|
||||
- bash: echo "##vso[task.setVariable variable=artifactName]$PLATFORM-$PYTHON_VERSION-$PYTHON_ARCHITECTURE"
|
||||
displayName: 'Compute artifact name'
|
||||
|
||||
- task: PublishPipelineArtifact@0
|
||||
inputs:
|
||||
artifactName: $(artifactName)
|
||||
targetPath: 'wheelhouse/'
|
||||
trigger:
|
||||
branches:
|
||||
include:
|
||||
- master
|
||||
- '*.x'
|
||||
tags:
|
||||
include:
|
||||
- '*'
|
||||
|
||||
jobs:
|
||||
- job: Test
|
||||
variables:
|
||||
vmImage: 'ubuntu-latest'
|
||||
python.version: '3.8'
|
||||
TOXENV: 'py'
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
Python 3.8 Linux:
|
||||
vmImage: 'ubuntu-latest'
|
||||
Python 3.8 Windows:
|
||||
vmImage: 'windows-latest'
|
||||
Python 3.8 Mac:
|
||||
vmImage: 'macos-latest'
|
||||
PyPy 3 Linux:
|
||||
python.version: 'pypy3'
|
||||
Python 3.7 Linux:
|
||||
python.version: '3.7'
|
||||
Python 3.6 Linux:
|
||||
python.version: '3.6'
|
||||
Python 3.5 Linux:
|
||||
python.version: '3.5'
|
||||
Python 2.7 Linux:
|
||||
python.version: '2.7'
|
||||
Docs:
|
||||
TOXENV: 'docs'
|
||||
Style:
|
||||
TOXENV: 'style'
|
||||
|
||||
pool:
|
||||
vmImage: $[ variables.vmImage ]
|
||||
|
||||
steps:
|
||||
- task: UsePythonVersion@0
|
||||
inputs:
|
||||
versionSpec: $(python.version)
|
||||
displayName: Use Python $(python.version)
|
||||
|
||||
- script: pip --disable-pip-version-check install -U tox
|
||||
displayName: Install tox
|
||||
|
||||
- script: tox
|
||||
displayName: Run tox
|
||||
|
||||
- job: Build
|
||||
dependsOn: Test
|
||||
condition: startsWith(variables['Build.SourceBranch'], 'refs/tags/')
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
Linux:
|
||||
vmImage: 'ubuntu-latest'
|
||||
Windows:
|
||||
vmImage: 'windows-latest'
|
||||
Mac:
|
||||
vmImage: 'macos-latest'
|
||||
|
||||
pool:
|
||||
vmImage: $[ variables.vmImage ]
|
||||
|
||||
steps:
|
||||
- task: UsePythonVersion@0
|
||||
displayName: Use Python
|
||||
|
||||
- script: choco install vcpython27 -f -y
|
||||
displayName: Install Visual C++ for Python 2.7
|
||||
condition: eq(variables['vmImage'], 'windows-latest')
|
||||
|
||||
- script: pip install cibuildwheel
|
||||
displayName: Install cibuildwheel
|
||||
|
||||
- script: cibuildwheel --output-dir wheels .
|
||||
displayName: Run cibuildwheel
|
||||
|
||||
- publish: 'wheels'
|
||||
|
|
|
@ -1,20 +1,20 @@
|
|||
repos:
|
||||
- repo: https://github.com/asottile/reorder_python_imports
|
||||
rev: v1.3.5
|
||||
rev: v1.9.0
|
||||
hooks:
|
||||
- id: reorder-python-imports
|
||||
args: ["--application-directories", "src"]
|
||||
- repo: https://github.com/ambv/black
|
||||
rev: 18.9b0
|
||||
- repo: https://github.com/python/black
|
||||
rev: 19.10b0
|
||||
hooks:
|
||||
- id: black
|
||||
- repo: https://gitlab.com/pycqa/flake8
|
||||
rev: 3.7.6
|
||||
rev: 3.7.9
|
||||
hooks:
|
||||
- id: flake8
|
||||
additional_dependencies: [flake8-bugbear]
|
||||
- repo: https://github.com/pre-commit/pre-commit-hooks
|
||||
rev: v2.1.0
|
||||
rev: v2.4.0
|
||||
hooks:
|
||||
- id: check-byte-order-marker
|
||||
- id: trailing-whitespace
|
||||
|
|
73
.travis.yml
73
.travis.yml
|
@ -1,73 +0,0 @@
|
|||
os: linux
|
||||
dist: xenial
|
||||
language: python
|
||||
python:
|
||||
- "3.7"
|
||||
- "3.6"
|
||||
- "3.5"
|
||||
- "3.4"
|
||||
- "2.7"
|
||||
- "nightly"
|
||||
- "pypy3.5-6.0"
|
||||
env: TOXENV=py,codecov
|
||||
|
||||
matrix:
|
||||
include:
|
||||
- env: TOXENV=stylecheck,docs-html
|
||||
- stage: wheel
|
||||
sudo: required
|
||||
services:
|
||||
- docker
|
||||
install:
|
||||
- pip install cibuildwheel
|
||||
script: &wheel_script
|
||||
- cibuildwheel --output-dir wheelhouse
|
||||
deploy: &wheel_deploy
|
||||
on:
|
||||
all_branches: true
|
||||
condition: $TRAVIS_BRANCH =~ ^(master|[0-9]+(.[0-9]+)*(.x)?)$
|
||||
skip_cleanup: true
|
||||
provider: s3
|
||||
access_key_id:
|
||||
secure: "zAF4qUM+MwCDt1NmMYDgHKldcQi+J2OdC/UCLfJLA/HRzIQoulIRKBcy6IEbf4IPaejwrhPtGG2LX9fIVBWsZs/3IyInf9ywSD88IdLPO0FUHcd6ebAsQSYuG2naVC9r0G6dDZzXT8vSf4Q2OxEsdsUg+NZtOmtv45jGlnuHc5Y="
|
||||
secret_access_key:
|
||||
secure: "I6OUM83O0o/N8Zvxk3vI40JDjQKniSUPPyeY5H53I+DtuUfFl0JOYHXr+XKjhM/CCGT3A2lJwugE1YOXch7fc5QRxp30Dl61ASOY3QFRp2EGNPNTBi5l9NYChPSEC96t6LzZJTSqvRmC+STrpinPW03egNKPJbBU8OKYyEyJr+M="
|
||||
bucket: pallets-wheels
|
||||
region: us-east-1
|
||||
local_dir: wheelhouse
|
||||
upload-dir: markupsafe
|
||||
- stage: wheel
|
||||
os: osx
|
||||
language: generic
|
||||
install:
|
||||
- pip2 install cibuildwheel
|
||||
script: *wheel_script
|
||||
deploy: *wheel_deploy
|
||||
allow_failures:
|
||||
- python: nightly
|
||||
- python: pypy3.5-6.0
|
||||
fast_finish: true
|
||||
|
||||
stages:
|
||||
- test
|
||||
- name: wheel
|
||||
if: NOT type = pull_request
|
||||
|
||||
install:
|
||||
- pip install tox
|
||||
|
||||
script:
|
||||
- tox --skip-missing-interpreters=false
|
||||
|
||||
cache:
|
||||
directories:
|
||||
- $HOME/.cache/pip
|
||||
- $HOME/.cache/pre-commit
|
||||
|
||||
branches:
|
||||
only:
|
||||
- master
|
||||
- /^\d+(\.\d+)*(\.x)?$/
|
||||
|
||||
notifications:
|
||||
email: false
|
|
@ -1,8 +1,6 @@
|
|||
include CHANGES.rst
|
||||
include LICENSE.rst
|
||||
include README.rst
|
||||
include tox.ini
|
||||
graft docs
|
||||
prune docs/_build
|
||||
graft tests
|
||||
global-exclude *.py[co]
|
||||
global-exclude *.pyc
|
||||
|
|
23
setup.cfg
23
setup.cfg
|
@ -1,13 +1,18 @@
|
|||
[metadata]
|
||||
license_file = LICENSE.rst
|
||||
long_description_content_type = text/x-rst
|
||||
|
||||
[tool:pytest]
|
||||
testpaths = tests
|
||||
filterwarnings =
|
||||
error
|
||||
|
||||
[coverage:run]
|
||||
branch = True
|
||||
branch = true
|
||||
parallel = true
|
||||
source =
|
||||
markupsafe
|
||||
tests
|
||||
|
||||
[coverage:paths]
|
||||
source =
|
||||
|
@ -22,11 +27,17 @@ source =
|
|||
# W = pycodestyle warnings
|
||||
# B9 = bugbear opinions
|
||||
select = B, E, F, W, B9
|
||||
# E203 = slice notation whitespace, invalid
|
||||
# E501 = line length, handled by bugbear B950
|
||||
# W503 = bin op line break, invalid
|
||||
ignore = E203, E501, W503
|
||||
ignore =
|
||||
# slice notation whitespace, invalid
|
||||
E203
|
||||
# line length, handled by bugbear B950
|
||||
E501
|
||||
# bare except, handled by bugbear B001
|
||||
E722
|
||||
# bin op line break, invalid
|
||||
W503
|
||||
# up to 88 allowed by bugbear B950
|
||||
max-line-length = 80
|
||||
# _compat names and imports will always look bad, ignore warnings
|
||||
exclude = src/markupsafe/_compat.py
|
||||
exclude =
|
||||
src/markupsafe/_compat.py
|
||||
|
|
5
setup.py
5
setup.py
|
@ -74,12 +74,7 @@ def run_setup(with_binary):
|
|||
"Operating System :: OS Independent",
|
||||
"Programming Language :: Python",
|
||||
"Programming Language :: Python :: 2",
|
||||
"Programming Language :: Python :: 2.7",
|
||||
"Programming Language :: Python :: 3",
|
||||
"Programming Language :: Python :: 3.4",
|
||||
"Programming Language :: Python :: 3.5",
|
||||
"Programming Language :: Python :: 3.6",
|
||||
"Programming Language :: Python :: 3.7",
|
||||
"Topic :: Internet :: WWW/HTTP :: Dynamic Content",
|
||||
"Topic :: Software Development :: Libraries :: Python Modules",
|
||||
"Topic :: Text Processing :: Markup :: HTML",
|
||||
|
|
38
tox.ini
38
tox.ini
|
@ -1,44 +1,20 @@
|
|||
[tox]
|
||||
envlist =
|
||||
py{37,36,35,34,27,py3,py3,py}
|
||||
stylecheck
|
||||
docs-html
|
||||
coverage-report
|
||||
py{38,37,36,35,27,py3,py}
|
||||
style
|
||||
docs
|
||||
skip_missing_interpreters = true
|
||||
|
||||
[testenv]
|
||||
setenv =
|
||||
COVERAGE_FILE = .coverage.{envname}
|
||||
deps =
|
||||
pytest-cov
|
||||
commands = pytest --tb=short --cov --cov-report= {posargs}
|
||||
pytest
|
||||
commands = pytest --tb=short --basetemp={envtmpdir} {posargs}
|
||||
|
||||
[testenv:stylecheck]
|
||||
[testenv:style]
|
||||
deps = pre-commit
|
||||
skip_install = true
|
||||
commands = pre-commit run --all-files --show-diff-on-failure
|
||||
|
||||
[testenv:docs-html]
|
||||
[testenv:docs]
|
||||
deps = -r docs/requirements.txt
|
||||
commands = sphinx-build -W -b html -d {envtmpdir}/doctrees docs {envtmpdir}/html
|
||||
|
||||
[testenv:coverage-report]
|
||||
setenv =
|
||||
COVERAGE_FILE = .coverage
|
||||
deps = coverage
|
||||
skip_install = true
|
||||
commands =
|
||||
coverage combine
|
||||
coverage html
|
||||
coverage report
|
||||
|
||||
[testenv:codecov]
|
||||
passenv = CI TRAVIS TRAVIS_*
|
||||
setenv =
|
||||
COVERAGE_FILE = .coverage
|
||||
deps = codecov
|
||||
skip_install = true
|
||||
commands =
|
||||
coverage combine
|
||||
codecov
|
||||
coverage report
|
||||
|
|
Loading…
Reference in New Issue