Commit 88651a21 authored by Hugo Lefeuvre's avatar Hugo Lefeuvre Committed by Hugo Lefeuvre

New upstream version 3.2.2

parent 0f67bc75
[bumpversion]
parse = (?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)(?P<pre>.*)
serialize =
{major}.{minor}.{patch}{pre}
{major}.{minor}.{patch}
current_version = 3.1.1
current_version = 3.2.2
commit = True
tag = True
[bumpversion:file:setup.py]
search = version='{current_version}'
replace = version='{new_version}'
[bumpversion:file:README.rst]
search = v{current_version}.
replace = v{new_version}.
[bumpversion:file:docs/conf.py]
search = version = release = '{current_version}'
replace = version = release = '{new_version}'
[bumpversion:file:src/pytest_benchmark/__init__.py]
search = __version__ = '{current_version}'
replace = __version__ = '{new_version}'
# Generated by cookiepatcher, a small shim around cookiecutter (pip install cookiepatcher)
cookiecutter:
appveyor: 'yes'
c_extension_cython: 'no'
c_extension_optional: 'no'
c_extension_support: 'no'
codacy: 'yes'
codeclimate: 'yes'
codecov: 'yes'
command_line_interface: 'no'
_template: cookiecutter-pylibrary
appveyor: yes
c_extension_function: longest
c_extension_module: _pytest_benchmark
c_extension_optional: no
c_extension_support: no
codacy: no
codeclimate: no
codecov: yes
command_line_interface: no
command_line_interface_bin_name: py.test-benchmark
coveralls: 'yes'
coveralls: yes
distribution_name: pytest-benchmark
email: contact@ionelmc.ro
full_name: Ionel Cristian Mărieș
github_username: ionelmc
landscape: 'yes'
landscape: no
license: BSD 2-Clause License
linter: flake8
package_name: pytest_benchmark
project_name: pytest-benchmark
project_short_description: A ``py.test`` fixture for benchmarking code. It will
group the tests into rounds that are calibrated to the chosen timer. See calibration_
and FAQ_.
release_date: unreleased
project_short_description: A ``py.test`` fixture for benchmarking code. It will group the tests into rounds that are calibrated to the chosen timer. See calibration_ and FAQ_.
release_date: '2017-07-26'
repo_name: pytest-benchmark
requiresio: 'yes'
scrutinizer: 'yes'
sphinx_doctest: 'no'
requiresio: yes
scrutinizer: no
sphinx_docs: yes
sphinx_doctest: no
sphinx_theme: sphinx-py3doc-enhanced-theme
test_matrix_configurator: 'no'
test_matrix_separate_coverage: 'yes'
test_matrix_configurator: no
test_matrix_separate_coverage: yes
test_runner: pytest
travis: 'yes'
version: 3.1.0a1
travis: yes
version: 3.1.1
website: http://blog.ionelmc.ro
year: 2014-2017
year: 2014-2019
......@@ -59,6 +59,7 @@ docs/_build
.env
.cache
.pytest
.pytest_cache/
.bootstrap
.appveyor.token
*.bak
......
This diff is collapsed.
......@@ -14,3 +14,16 @@ Authors
* Andre Bianchi - https://github.com/drebs
* Jeremy Dobbins-Bucklad - https://github.com/jad-b
* Alexey Popravka - https://github.com/popravich
* Ken Crowell - https://github.com/oeuftete
* Matthew Feickert - https://github.com/matthewfeickert
* Julien Nicoulaud - https://github.com/nicoulaj
* Pablo Aguiar - https://github.com/scorphus
* Alex Ford - https://github.com/asford
* Francesco Ballarin - https://github.com/francesco-ballarin
* Lincoln de Sousa - https://github.com/clarete
* Jose Eduardo - https://github.com/JoseKilo
* Ofek Lev - https://github.com/ofek
* Anton Lodder - https://github.com/AnjoMan
* Alexander Duryagin - https://github.com/daa
* Stanislav Levin - https://github.com/stanislavlevin
* Grygorii Iermolenko - https://github.com/gyermolenko
......@@ -2,6 +2,57 @@
Changelog
=========
3.2.2 (2017-01-12)
------------------
* Added support for pytest items without funcargs. Fixes interoperability with other pytest plugins like pytest-flake8.
3.2.1 (2017-01-10)
------------------
* Updated changelog entries for 3.2.0. I made the release for pytest-cov on the same day and thought I updated the
changelogs for both plugins. Alas, I only updated pytest-cov.
* Added missing version constraint change. Now pytest >= 3.8 is required (due to pytest 4.1 support).
* Fixed couple CI/test issues.
* Fixed broken ``pytest_benchmark.__version__``.
3.2.0 (2017-01-07)
------------------
* Added support for simple ``trial`` x-axis histogram label. Contributed by Ken Crowell in
`#95 <https://github.com/ionelmc/pytest-benchmark/pull/95>`_).
* Added support for Pytest 3.3+, Contributed by Julien Nicoulaud in
`#103 <https://github.com/ionelmc/pytest-benchmark/pull/103>`_.
* Added support for Pytest 4.0. Contributed by Pablo Aguiar in
`#129 <https://github.com/ionelmc/pytest-benchmark/pull/129>`_ and
`#130 <https://github.com/ionelmc/pytest-benchmark/pull/130>`_.
* Added support for Pytest 4.1.
* Various formatting, spelling and documentation fixes. Contributed by
Ken Crowell, Ofek Lev, Matthew Feickert, Jose Eduardo, Anton Lodder, Alexander Duryagin and Grygorii Iermolenko in
`#97 <https://github.com/ionelmc/pytest-benchmark/pull/97>`_,
`#97 <https://github.com/ionelmc/pytest-benchmark/pull/97>`_,
`#105 <https://github.com/ionelmc/pytest-benchmark/pull/105>`_,
`#110 <https://github.com/ionelmc/pytest-benchmark/pull/110>`_,
`#111 <https://github.com/ionelmc/pytest-benchmark/pull/111>`_,
`#115 <https://github.com/ionelmc/pytest-benchmark/pull/115>`_,
`#123 <https://github.com/ionelmc/pytest-benchmark/pull/123>`_,
`#131 <https://github.com/ionelmc/pytest-benchmark/pull/131>`_ and
`#140 <https://github.com/ionelmc/pytest-benchmark/pull/140>`_.
* Fixed broken ``pytest_benchmark_update_machine_info`` hook. Contributed by Alex Ford in
`#109 <https://github.com/ionelmc/pytest-benchmark/pull/109>`_.
* Fixed bogus xdist warning when using ``--benchmark-disable``. Contributed by Francesco Ballarin in
`#113 <https://github.com/ionelmc/pytest-benchmark/pull/113>`_.
* Added support for pathlib2. Contributed by Lincoln de Sousa in
`#114 <https://github.com/ionelmc/pytest-benchmark/pull/114>`_.
* Changed handling so you can use ``--benchmark-skip`` and ``--benchmark-only``, with the later having priority.
Contributed by Ofek Lev in
`#116 <https://github.com/ionelmc/pytest-benchmark/pull/116>`_.
* Fixed various CI/testing issues.
Contributed by Stanislav Levin in
`#134 <https://github.com/ionelmc/pytest-benchmark/pull/134>`_,
`#136 <https://github.com/ionelmc/pytest-benchmark/pull/136>`_ and
`#138 <https://github.com/ionelmc/pytest-benchmark/pull/138>`_.
3.1.1 (2017-07-26)
------------------
......@@ -22,11 +73,11 @@ Changelog
`#75 <https://github.com/ionelmc/pytest-benchmark/pull/75>`_.
* Fixed the leaking of credentials by masking the URL printed when storing
data to elasticsearch.
* Added a `--benchmark-netrc` option to use credentials from a netrc file when
* Added a ``--benchmark-netrc`` option to use credentials from a netrc file when
storing data to elasticsearch. Both contributed by Andre Bianchi in
`#73 <https://github.com/ionelmc/pytest-benchmark/pull/73>`_.
* Fixed docs on hooks. Contributed by Andre Bianchi in `#74 <https://github.com/ionelmc/pytest-benchmark/pull/74>`_.
* Remove `git` and `hg` as system dependencies when guessing the project name.
* Remove ``git`` and ``hg`` as system dependencies when guessing the project name.
3.1.0a2 (2017-03-27)
--------------------
......@@ -38,12 +89,12 @@ Changelog
* Fix support for latest PyGal version (histograms). Contributed by Swen Kooij in
`#68 <https://github.com/ionelmc/pytest-benchmark/pull/68>`_.
* Added support for getting ``commit_info`` when not running in the root of the repository. Contributed by Vara Canero in
`#69 <https://github.com/ionelmc/pytest-benchmark/pull/69>` _.
`#69 <https://github.com/ionelmc/pytest-benchmark/pull/69>`_.
* Added short form for ``--storage``/``--verbose`` options in CLI.
* Added an alternate ``pytest-benchmark`` CLI bin (in addition to ``py.test-benchmark``) to match the madness in pytest.
* Fix some issues with `--help`` in CLI.
* Fix some issues with ``--help`` in CLI.
* Improved git remote parsing (for ``commit_info`` in JSON outputs).
* Fixed default value for `--benchmark-columns``.
* Fixed default value for ``--benchmark-columns``.
* Fixed comparison mode (loading was done too late).
* Remove the project name from the autosave name. This will get the old brief naming from 3.0 back.
......@@ -54,13 +105,13 @@ Changelog
Antonio Cuni in `#34 <https://github.com/ionelmc/pytest-benchmark/pull/34>`_.
* Added support for grouping by specific test parametrization (``--benchmark-group-by=param:NAME`` where ``NAME`` is your
param name). Contributed by Antonio Cuni in `#37 <https://github.com/ionelmc/pytest-benchmark/pull/37>`_.
* Added support for `name` or `fullname` in ``--benchmark-sort``.
* Added support for ``name`` or ``fullname`` in ``--benchmark-sort``.
Contributed by Antonio Cuni in `#37 <https://github.com/ionelmc/pytest-benchmark/pull/37>`_.
* Changed signature for ``pytest_benchmark_generate_json`` hook to take 2 new arguments: ``machine_info`` and ``commit_info``.
* Changed `--benchmark-histogram`` to plot groups instead of name-matching runs.
* Changed `--benchmark-histogram`` to plot exactly what you compared against. Now it's ``1:1`` with the compare feature.
* Changed `--benchmark-compare`` to allow globs. You can compare against all the previous runs now.
* Changed `--benchmark-group-by`` to allow multiple values separated by comma.
* Changed ``--benchmark-histogram`` to plot groups instead of name-matching runs.
* Changed ``--benchmark-histogram`` to plot exactly what you compared against. Now it's ``1:1`` with the compare feature.
* Changed ``--benchmark-compare`` to allow globs. You can compare against all the previous runs now.
* Changed ``--benchmark-group-by`` to allow multiple values separated by comma.
Example: ``--benchmark-group-by=param:foo,param:bar``
* Added a command line tool to compare previous data: ``py.test-benchmark``. It has two commands:
......@@ -110,7 +161,7 @@ Changelog
---------------------
* Add a ``--benchmark-disable`` option. It's automatically activated when xdist is on
* When xdist is on or `statistics` can't be imported then ``--benchmark-disable`` is automatically activated (instead
* When xdist is on or ``statistics`` can't be imported then ``--benchmark-disable`` is automatically activated (instead
of ``--benchmark-skip``). **BACKWARDS INCOMPATIBLE**
* Replace the deprecated ``__multicall__`` with the new hookwrapper system.
* Improved description for ``--benchmark-max-time``.
......@@ -119,7 +170,7 @@ Changelog
--------------------
* Tests are sorted alphabetically in the results table.
* Failing to import `statistics` doesn't create hard failures anymore. Benchmarks are automatically skipped if import
* Failing to import ``statistics`` doesn't create hard failures anymore. Benchmarks are automatically skipped if import
failure occurs. This would happen on Python 3.2 (or earlier Python 3).
3.0.0a4 (2015-10-08)
......@@ -146,7 +197,7 @@ Changelog
* Added benchmark data storage(the ``--benchmark-save`` and ``--benchmark-autosave`` command line arguments).
* Added comparison to previous runs (the ``--benchmark-compare`` command line argument).
* Added performance regression checks (the ``--benchmark-compare-fail`` command line argument).
* Added possibility to group by various parts of test name (the `--benchmark-compare-group-by`` command line argument).
* Added possibility to group by various parts of test name (the ``--benchmark-compare-group-by`` command line argument).
* Added historical plotting (the ``--benchmark-histogram`` command line argument).
* Added option to fine tune the calibration (the ``--benchmark-calibration-precision`` command line argument and
``calibration_precision`` marker option).
......@@ -171,13 +222,13 @@ Changelog
* Tracers are automatically disabled when running the test function (like coverage tracers).
* Fixed an issue with calibration code getting stuck.
* Added `pedantic mode` via ``benchmark.pedantic()``. This mode disables calibration and allows a setup function.
* Added ``pedantic mode`` via ``benchmark.pedantic()``. This mode disables calibration and allows a setup function.
2.5.0 (2015-06-20)
------------------
* Improved test suite a bit (not using `cram` anymore).
* Improved test suite a bit (not using ``cram`` anymore).
* Improved help text on the ``--benchmark-warmup`` option.
* Made ``warmup_iterations`` available as a marker argument (eg: ``@pytest.mark.benchmark(warmup_iterations=1234)``).
* Fixed ``--benchmark-verbose``'s printouts to work properly with output capturing.
......@@ -194,8 +245,8 @@ Changelog
------------------
* Add a ``benchmark_weave`` experimental fixture.
* Fix internal failures when `xdist` plugin is active.
* Automatically disable benchmarks if `xdist` is active.
* Fix internal failures when ``xdist`` plugin is active.
* Automatically disable benchmarks if ``xdist`` is active.
2.3.0 (2014-12-27)
------------------
......@@ -230,5 +281,5 @@ Changelog
? (?)
-----
* Readme and styling fixes. Contributed by Marc Abramowitz in `#4 <https://github.com/ionelmc/pytest-benchmark/pull/4>`_.
* README and styling fixes. Contributed by Marc Abramowitz in `#4 <https://github.com/ionelmc/pytest-benchmark/pull/4>`_.
* Lots of wild changes.
......@@ -49,7 +49,7 @@ To set up `pytest-benchmark` for local development:
Now you can make your changes locally.
4. When you're done making changes, run all the checks, doc builder and spell checker with `tox <http://tox.readthedocs.org/en/latest/install.html>`_ one command::
4. When you're done making changes, run all the checks, doc builder and spell checker with `tox <http://tox.readthedocs.io/en/latest/install.html>`_ one command::
tox
......@@ -83,7 +83,7 @@ Tips
To run a subset of tests::
tox -e envname -- py.test -k test_myfeature
tox -e envname -- pytest -k test_myfeature
To run all the test environments in *parallel* (you need to ``pip install detox``)::
......
Copyright (c) 2014-2017, Ionel Cristian Mărieș
BSD 2-Clause License
Copyright (c) 2014-2019, Ionel Cristian Mărieș
All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the
......
graft docs
graft examples
graft src
graft ci
graft tests
......@@ -8,7 +7,6 @@ include .bumpversion.cfg
include .coveragerc
include .cookiecutterrc
include .editorconfig
include .isort.cfg
include AUTHORS.rst
include CHANGELOG.rst
......
......@@ -12,7 +12,6 @@ Overview
* - tests
- | |travis| |appveyor| |requires|
| |coveralls| |codecov|
| |landscape| |scrutinizer| |codacy| |codeclimate|
* - package
- | |version| |wheel| |supported-versions| |supported-implementations|
| |commits-since|
......@@ -45,49 +44,33 @@ Overview
:alt: Coverage Status
:target: https://codecov.io/github/ionelmc/pytest-benchmark
.. |landscape| image:: https://landscape.io/github/ionelmc/pytest-benchmark/master/landscape.svg?style=flat
:target: https://landscape.io/github/ionelmc/pytest-benchmark/master
:alt: Code Quality Status
.. |codacy| image:: https://img.shields.io/codacy/80e2960677c24d5083a802dd57df17dc.svg?style=flat
:target: https://www.codacy.com/app/ionelmc/pytest-benchmark
:alt: Codacy Code Quality Status
.. |codeclimate| image:: https://codeclimate.com/github/ionelmc/pytest-benchmark/badges/gpa.svg
:target: https://codeclimate.com/github/ionelmc/pytest-benchmark
:alt: CodeClimate Quality Status
.. |version| image:: https://img.shields.io/pypi/v/pytest-benchmark.svg
:alt: PyPI Package latest release
:target: https://pypi.python.org/pypi/pytest-benchmark
:target: https://pypi.org/project/pytest-benchmark
.. |commits-since| image:: https://img.shields.io/github/commits-since/ionelmc/pytest-benchmark/v3.1.1.svg
.. |commits-since| image:: https://img.shields.io/github/commits-since/ionelmc/pytest-benchmark/v3.2.2.svg
:alt: Commits since latest release
:target: https://github.com/ionelmc/pytest-benchmark/compare/v3.1.1...master
:target: https://github.com/ionelmc/pytest-benchmark/compare/v3.2.2...master
.. |wheel| image:: https://img.shields.io/pypi/wheel/pytest-benchmark.svg
:alt: PyPI Wheel
:target: https://pypi.python.org/pypi/pytest-benchmark
:target: https://pypi.org/project/pytest-benchmark
.. |supported-versions| image:: https://img.shields.io/pypi/pyversions/pytest-benchmark.svg
:alt: Supported versions
:target: https://pypi.python.org/pypi/pytest-benchmark
:target: https://pypi.org/project/pytest-benchmark
.. |supported-implementations| image:: https://img.shields.io/pypi/implementation/pytest-benchmark.svg
:alt: Supported implementations
:target: https://pypi.python.org/pypi/pytest-benchmark
.. |scrutinizer| image:: https://img.shields.io/scrutinizer/g/ionelmc/pytest-benchmark/master.svg
:alt: Scrutinizer Status
:target: https://scrutinizer-ci.com/g/ionelmc/pytest-benchmark/
:target: https://pypi.org/project/pytest-benchmark
.. end-badges
A ``py.test`` fixture for benchmarking code. It will group the tests into rounds that are calibrated to the chosen
A ``pytest`` fixture for benchmarking code. It will group the tests into rounds that are calibrated to the chosen
timer. See calibration_ and FAQ_.
* Free software: BSD license
* Free software: BSD 2-Clause License
Installation
============
......@@ -99,7 +82,9 @@ Installation
Documentation
=============
Available at: `pytest-benchmark.readthedocs.org <http://pytest-benchmark.readthedocs.org/en/stable/>`_.
For latest release: `pytest-benchmark.readthedocs.org/en/stable <http://pytest-benchmark.readthedocs.org/en/stable/>`_.
For master branch (may include documentation fixes): `pytest-benchmark.readthedocs.io/en/latest <http://pytest-benchmark.readthedocs.io/en/latest/>`_.
Examples
========
......@@ -116,8 +101,8 @@ But first, a prologue:
or whole programs you will need to write a wrapper function.
* In a test you can only benchmark one function. If you want to benchmark many functions write more tests or
use `parametrization <http://docs.pytest.org/en/latest/parametrize.html>`.
* To run the benchmarks you simply use `py.test` to run your "tests". The plugin will automatically do the
benchmarking and generate a result table. Run ``py.test --help`` for more details.
* To run the benchmarks you simply use `pytest` to run your "tests". The plugin will automatically do the
benchmarking and generate a result table. Run ``pytest --help`` for more details.
This plugin provides a `benchmark` fixture. This fixture is a callable object that will benchmark any function passed
to it.
......@@ -190,12 +175,12 @@ Screenshots
Normal run:
.. image:: https://github.com/ionelmc/pytest-benchmark/raw/master/docs/screenshot.png
:alt: Screenshot of py.test summary
:alt: Screenshot of pytest summary
Compare mode (``--benchmark-compare``):
.. image:: https://github.com/ionelmc/pytest-benchmark/raw/master/docs/screenshot-compare.png
:alt: Screenshot of py.test summary in compare mode
:alt: Screenshot of pytest summary in compare mode
Histogram (``--benchmark-histogram``):
......
This diff is collapsed.
......@@ -18,24 +18,19 @@ BASE_URL = "https://www.python.org/ftp/python/"
GET_PIP_URL = "https://bootstrap.pypa.io/get-pip.py"
GET_PIP_PATH = "C:\get-pip.py"
URLS = {
("2.7", "64"): BASE_URL + "2.7.10/python-2.7.13.amd64.msi",
("2.7", "32"): BASE_URL + "2.7.10/python-2.7.13.msi",
# NOTE: no .msi installer for 3.3.6
("3.3", "64"): BASE_URL + "3.3.3/python-3.3.5.amd64.msi",
("3.3", "32"): BASE_URL + "3.3.3/python-3.3.5.msi",
("3.4", "64"): BASE_URL + "3.4.3/python-3.4.6.amd64.msi",
("3.4", "32"): BASE_URL + "3.4.3/python-3.4.6.msi",
("3.5", "64"): BASE_URL + "3.5.0/python-3.5.3-amd64.exe",
("3.5", "32"): BASE_URL + "3.5.0/python-3.5.3.exe",
("3.6", "64"): BASE_URL + "3.6.0/python-3.6.0-amd64.exe",
("3.6", "32"): BASE_URL + "3.6.0/python-3.6.0.exe",
("2.7", "64"): BASE_URL + "2.7.13/python-2.7.13.amd64.msi",
("2.7", "32"): BASE_URL + "2.7.13/python-2.7.13.msi",
("3.4", "64"): BASE_URL + "3.4.4/python-3.4.4.amd64.msi",
("3.4", "32"): BASE_URL + "3.4.4/python-3.4.4.msi",
("3.5", "64"): BASE_URL + "3.5.4/python-3.5.4-amd64.exe",
("3.5", "32"): BASE_URL + "3.5.4/python-3.5.4.exe",
("3.6", "64"): BASE_URL + "3.6.2/python-3.6.2-amd64.exe",
("3.6", "32"): BASE_URL + "3.6.2/python-3.6.2.exe",
}
INSTALL_CMD = {
# Commands are allowed to fail only if they are not the last command. Eg: uninstall (/x) allowed to fail.
"2.7": [["msiexec.exe", "/L*+!", "install.log", "/qn", "/x", "{path}"],
["msiexec.exe", "/L*+!", "install.log", "/qn", "/i", "{path}", "TARGETDIR={home}"]],
"3.3": [["msiexec.exe", "/L*+!", "install.log", "/qn", "/x", "{path}"],
["msiexec.exe", "/L*+!", "install.log", "/qn", "/i", "{path}", "TARGETDIR={home}"]],
"3.4": [["msiexec.exe", "/L*+!", "install.log", "/qn", "/x", "{path}"],
["msiexec.exe", "/L*+!", "install.log", "/qn", "/i", "{path}", "TARGETDIR={home}"]],
"3.5": [["{path}", "/quiet", "TargetDir={home}"]],
......
:: To build extensions for 64 bit Python 3, we need to configure environment
:: variables to use the MSVC 2010 C++ compilers from GRMSDKX_EN_DVD.iso of:
:: MS Windows SDK for Windows 7 and .NET Framework 4 (SDK v7.1)
::
:: To build extensions for 64 bit Python 2, we need to configure environment
:: variables to use the MSVC 2008 C++ compilers from GRMSDKX_EN_DVD.iso of:
:: MS Windows SDK for Windows 7 and .NET Framework 3.5 (SDK v7.0)
::
:: 32 bit builds do not require specific environment configurations.
::
:: Note: this script needs to be run with the /E:ON and /V:ON flags for the
:: cmd interpreter, at least for (SDK v7.0)
::
:: More details at:
:: https://github.com/cython/cython/wiki/64BitCythonExtensionsOnWindows
:: http://stackoverflow.com/a/13751649/163740
::
:: Author: Olivier Grisel
:: License: CC0 1.0 Universal: http://creativecommons.org/publicdomain/zero/1.0/
:: Very simple setup:
:: - if WINDOWS_SDK_VERSION is set then activate the SDK.
:: - disable the WDK if it's around.
SET COMMAND_TO_RUN=%*
SET WIN_SDK_ROOT=C:\Program Files\Microsoft SDKs\Windows
SET WIN_WDK="c:\Program Files (x86)\Windows Kits\10\Include\wdf"
ECHO SDK: %WINDOWS_SDK_VERSION% ARCH: %PYTHON_ARCH%
IF "%PYTHON_VERSION%"=="3.5" (
IF EXIST %WIN_WDK% (
REM See: https://connect.microsoft.com/VisualStudio/feedback/details/1610302/
REN %WIN_WDK% 0wdf
)
GOTO main
)
IF "%PYTHON_ARCH%"=="32" (
GOTO main
IF EXIST %WIN_WDK% (
REM See: https://connect.microsoft.com/VisualStudio/feedback/details/1610302/
REN %WIN_WDK% 0wdf
)
IF "%WINDOWS_SDK_VERSION%"=="" GOTO main
SET DISTUTILS_USE_SDK=1
SET MSSdk=1
......@@ -41,6 +19,5 @@ SET MSSdk=1
CALL "%WIN_SDK_ROOT%\%WINDOWS_SDK_VERSION%\Bin\SetEnv.cmd" /x64 /release
:main
ECHO Executing: %COMMAND_TO_RUN%
CALL %COMMAND_TO_RUN% || EXIT 1
......@@ -4,12 +4,12 @@ from __future__ import absolute_import, print_function, unicode_literals
import os
import sys
from collections import defaultdict
from os.path import abspath
from os.path import dirname
from os.path import exists
from os.path import join
if __name__ == "__main__":
base_path = dirname(dirname(abspath(__file__)))
print("Project path: {0}".format(base_path))
......@@ -28,9 +28,10 @@ if __name__ == "__main__":
subprocess.check_call([sys.executable, "-m", "virtualenv", env_path])
print("Installing `jinja2` into bootstrap environment...")
subprocess.check_call([join(bin_path, "pip"), "install", "jinja2"])
activate = join(bin_path, "activate_this.py")
# noinspection PyCompatibility
exec(compile(open(activate, "rb").read(), activate, "exec"), dict(__file__=activate))
python_executable = join(bin_path, "python")
if not os.path.samefile(python_executable, sys.executable):
print("Re-executing with: {0}".format(python_executable))
os.execv(python_executable, [python_executable, __file__])
import jinja2
......@@ -49,9 +50,17 @@ if __name__ == "__main__":
for line in subprocess.check_output(['tox', '--listenvs'], universal_newlines=True).splitlines()
]
tox_environments = [line for line in tox_environments if line not in ['clean', 'report', 'docs', 'check']]
tox_environments_by_python = defaultdict(list)
for env in tox_environments:
parts = env.split('-')
if "pytest40" in parts:
continue
if "pygal23" in parts:
continue
tox_environments_by_python[(parts[0], parts[-1])].append(env)
for name in os.listdir(join("ci", "templates")):
with open(join(base_path, name), "w") as fh:
fh.write(jinja.get_template(name).render(tox_environments=tox_environments))
fh.write(jinja.get_template(name).render(tox_environments=tox_environments,
tox_environments_by_python=tox_environments_by_python))
print("Wrote {}".format(name))
print("DONE.")
......@@ -10,17 +10,21 @@ env:
- TOXENV=docs
matrix:
include:
{% for env in tox_environments %}{{ '' }}
- python: '{{ '{0[0]}-5.4'.format(env.split('-')) if env.startswith('pypy') else '{0[2]}.{0[3]}'.format(env) }}'
{%- for env in tox_environments %}{{ '' }}
- python: '{{ env.split("-")[0] if env.startswith("pypy") else "{0[2]}.{0[3]}".format(env) }}'
{% if env.startswith('py37') %}
dist: xenial
sudo: required
{% endif %}
env:
- TOXENV={{ env }}{% if 'cover' in env %},report,coveralls,codecov{% endif -%}
{% endfor %}{{ '' }}
{%- endfor %}{{ '' }}
before_install:
- python --version
- uname -a
- lsb_release -a
install:
- pip install -U tox wheel $(if python -V |& grep -q 'Python 3.2'; then echo 'pip<8.0 virtualenv<14.0 setuptools<30.0'; else echo setuptools; fi)
- pip install tox
- virtualenv --version
- easy_install --version
- pip --version
......@@ -29,21 +33,21 @@ install:
set -ex
if [[ $TRAVIS_PYTHON_VERSION == 'pypy' ]]; then
(cd $HOME
wget https://bitbucket.org/squeaky/portable-pypy/downloads/pypy-5.7.1-linux_x86_64-portable.tar.bz2
tar xf pypy-5.7.1-linux_x86_64-portable.tar.bz2
pypy-5.7.1-linux_x86_64-portable/bin/pypy -m ensurepip
pypy-5.7.1-linux_x86_64-portable/bin/pypy -m pip install -U virtualenv)
export PATH=$HOME/pypy-5.7.1-linux_x86_64-portable/bin/:$PATH
export TOXPYTHON=$HOME/pypy-5.7.1-linux_x86_64-portable/bin/pypy
wget https://bitbucket.org/pypy/pypy/downloads/pypy2-v6.0.0-linux64.tar.bz2
tar xf pypy2-*.tar.bz2
pypy2-*/bin/pypy -m ensurepip
pypy2-*/bin/pypy -m pip install -U virtualenv)
export PATH=$(echo $HOME/pypy2-*/bin):$PATH
export TOXPYTHON=$(echo $HOME/pypy2-*/bin/pypy)
fi
if [[ $TRAVIS_PYTHON_VERSION == 'pypy3' ]]; then
(cd $HOME
wget https://bitbucket.org/squeaky/portable-pypy/downloads/pypy3.5-5.7.1-beta-linux_x86_64-portable.tar.bz2
tar xf pypy3.5-5.7.1-beta-linux_x86_64-portable.tar.bz2
pypy3.5-5.7.1-beta-linux_x86_64-portable/bin/pypy3 -m ensurepip
pypy3.5-5.7.1-beta-linux_x86_64-portable/bin/pypy3 -m pip install -U virtualenv)
export PATH=$HOME/pypy3.5-5.7.1-beta-linux_x86_64-portable/bin/:$PATH
export TOXPYTHON=$HOME/pypy3.5-5.7.1-beta-linux_x86_64-portable/bin/pypy3
wget https://bitbucket.org/pypy/pypy/downloads/pypy3-v6.0.0-linux64.tar.bz2
tar xf pypy3-*.tar.bz2
pypy3-*/bin/pypy3 -m ensurepip
pypy3-*/bin/pypy3 -m pip install -U virtualenv)
export PATH=$(echo $HOME/pypy3-*/bin):$PATH
export TOXPYTHON=$(echo $HOME/pypy3-*/bin/pypy3)
fi
set +x
script:
......
......@@ -7,28 +7,26 @@ environment:
WITH_COMPILER: 'cmd /E:ON /V:ON /C .\ci\appveyor-with-compiler.cmd'
matrix:
- TOXENV: check
TOXPYTHON: C:\Python27\python.exe
PYTHON_HOME: C:\Python27
PYTHON_VERSION: '2.7'
PYTHON_ARCH: '32'
{% for env in tox_environments %}{% if env.startswith(('py27', 'py3')) %}
- TOXENV: '{{ env }}{% if 'cover' in env %},report,codecov{% endif %}'
TOXPYTHON: C:\Python{{ env[2:4] }}\python.exe
PYTHON_HOME: C:\Python{{ env[2:4] }}
PYTHON_VERSION: '{{ env[2] }}.{{ env[3] }}'
{% for (py, cover), tox_environments in tox_environments_by_python.items() %}{{ '' }}{% if py.startswith(('py2', 'py3')) %}
- TOXENV: '{{ tox_environments|join(',') }}{% if 'cover' in cover %},report,codecov{% endif %}'
TOXPYTHON: C:\Python{{ py[2:4] }}\python.exe
PYTHON_HOME: C:\Python{{ py[2:4] }}
PYTHON_VERSION: '{{ py[2] }}.{{ py[3] }}'
PYTHON_ARCH: '32'
- TOXENV: '{{ tox_environments|join(',') }}{% if 'cover' in cover %},report,codecov{%- endif %}'
TOXPYTHON: C:\Python{{ py[2:4] }}-x64\python.exe
{%- if py.startswith(('py2', 'py34')) %}
- TOXENV: '{{ env }}{% if 'cover' in env %},report,codecov{%- endif %}'
TOXPYTHON: C:\Python{{ env[2:4] }}-x64\python.exe
{%- if env.startswith(('py2', 'py33', 'py34')) %}
WINDOWS_SDK_VERSION: v7.{{ '1' if env.startswith('py3') else '0' }}
WINDOWS_SDK_VERSION: v7.{{ '1' if py.startswith('py3') else '0' }}
{%- endif %}
PYTHON_HOME: C:\Python{{ env[2:4] }}-x64
PYTHON_VERSION: '{{ env[2] }}.{{ env[3] }}'
PYTHON_HOME: C:\Python{{ py[2:4] }}-x64
PYTHON_VERSION: '{{ py[2] }}.{{ py[3] }}'
PYTHON_ARCH: '64'
{% endif %}{% endfor %}
init:
- ps: echo $env:TOXENV
......
[tox]
envlist =
clean,
check,
{py26,py27,py33,py34,py35,py36,pypy,pypy3}-{pytest28,pytest29,pytest30}-{pygal22,pygal23}-{nodist,xdist}-{cover,nocov},
{py32}-{pytest28,pytest29},
report,
docs
[testenv]
basepython =
pypy: {env:TOXPYTHON:pypy}
pypy3: {env:TOXPYTHON:pypy3}
py26: {env:TOXPYTHON:python2.6}
{py27,docs}: {env:TOXPYTHON:python2.7}
py32: {env:TOXPYTHON:python3.2}
py33: {env:TOXPYTHON:python3.3}
py34: {env:TOXPYTHON:python3.4}
py35: {env:TOXPYTHON:python3.5}
py36: {env:TOXPYTHON:python3.6}
{clean,bootstrap,report,check,codecov,coveralls}: {env:TOXPYTHON:python}
setenv =
PYTHONPATH={toxinidir}/tests
PYTHONUNBUFFERED=yes
COV_CORE_SOURCE={toxinidir}/src
COV_CORE_CONFIG={toxinidir}/.coveragerc
COV_CORE_DATAFILE={toxinidir}/.coverage.eager
passenv =
*
deps =
pytest-instafail==0.3.0
xdist: pytest-xdist==1.16.0
{py26,py27,py32,py33,pypy}: statistics==1.0.3.5
{py26,py27,py32,py33,pypy}: pathlib==1.0.1
{py26,py27,py32,pypy}: mock==2.0.0
{py26,py32}: py-cpuinfo<3.0.0
pytest28: pytest==2.8.7
pytest29: pytest==2.9.2
pytest30: pytest==3.0.7
pytest-travis-fold
cover: pytest-cov
cover: coverage
pypy: jitviewer
aspectlib==1.4.2
pygal23: pygal==2.3.1
pygal22: pygal==2.2.3
pygaljs==1.0.1
freezegun==0.3.8
hunter==1.4.1
elasticsearch==5.3.0
commands =
cover: {posargs:py.test --cov=src --cov-report=term-missing --cov-append -vv}
nocov: {posargs:py.test -vv tests}
[testenv:bootstrap]
deps =
jinja2
matrix
skip_install = true
commands =
python ci/bootstrap.py
passenv =
*
[testenv:spell]
setenv =
SPELLCHECK=1
commands =
sphinx-build -b spelling docs dist/docs
skip_install = true
deps =
-r{toxinidir}/docs/requirements.txt
sphinxcontrib-spelling
pyenchant
[testenv:docs]
deps =
-r{toxinidir}/docs/requirements.txt
commands =
sphinx-build {posargs:-E} -b html docs dist/docs
sphinx-build -b linkcheck docs dist/docs
[testenv:check]
deps =
docutils
check-manifest
flake8
readme-renderer
pygments
isort
skip_install = true
usedevelop = false
commands =
python setup.py check --strict --metadata --restructuredtext