Skip to content

Commit

Permalink
BUG: Allow setting ASV_RUNNER_PATH from os
Browse files Browse the repository at this point in the history
  • Loading branch information
HaoZeke committed Aug 7, 2023
1 parent cd0c22d commit 8e39037
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
New Features
^^^^^^^^^^^^
- ``asv_runner`` is now used internally, making the addition of custom benchmark types viable (#1287)
- ``ASV_RUNNER_PATH`` can be set from the terminal to test newer versions of ``asv_runner`` (#1303)

API Changes
^^^^^^^^^^^
Expand Down
3 changes: 2 additions & 1 deletion asv/environment.py
Original file line number Diff line number Diff line change
Expand Up @@ -507,7 +507,8 @@ def __init__(self, conf, python, requirements, tagged_env_vars):
# These are needed for asv to build and run the project, not part of
# benchmark name mangling
self._base_requirements = {}
self._base_requirements["pip+asv_runner"] = ""
# gh-1314
self._base_requirements["pip+asv_runner"] = os.getenv("ASV_RUNNER_PATH", "")
if not util.ON_PYPY:
# XXX: What if pypy installed asv tries to benchmark a cpython
# python?
Expand Down
8 changes: 8 additions & 0 deletions docs/source/env_vars.rst
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,14 @@ behavior are also set:
- ``PYTHONNOUSERSITE``: ``True`` (for conda environments only)
- ``PYTHONPATH``: unset (if really needed, can be overridden by setting ``ASV_PYTHONPATH``)

.. note::

.. versionadded::0.6
``ASV_RUNNER_PATH`` may be set to provide a local installation of
``asv_runner``, mostly used for the CI to ensure changes to ``asv_runner``
do not break ``asv``
Custom environment variables
----------------------------
Expand Down

0 comments on commit 8e39037

Please sign in to comment.