Closed jaraco closed 7 months ago
Moving the config to the [tox]
section allows the tests to run:
[tox]
package_root = dev/breeze
[testenv]
commands =
pytest dev/breeze/tests {posargs}
package = editable
I would expect the setting to work in testenv
based on this documentation.
Hi @jaraco,
Thanks for the report.
It seems for reasons this options was documented twice.
In https://tox.wiki/en/latest/config.html#package_root it is in the correct section, labelled as
The following options are set in the [tox] section of tox.ini or the [tox:tox] section of setup.cfg.
I would suggest to remove the duplicated and misleading section you are referring to.
As @gaborbernat is off for a bit, @jaraco, would you kindly review #3251?
Closed by #3250
Thanks!
Issue
Running
tox
in apache/airflow configured to usedev/breeze
as the test package seems to ignore thepackage_root
configuration setting and instead builds.
.I've tried replacing
package_root
with "foo/bar", and the output is the same, suggesting that value is ignored completely. I tried settingsetupdir
instead, but there's no observed difference.Environment
Provide at least:
Output of
```console airflow 72d19565d8 @ pipx runpip tox list Package Version ------------- ------- cachetools 5.3.2 chardet 5.2.0 colorama 0.4.6 distlib 0.3.8 filelock 3.13.1 packaging 23.2 pip 24.0 platformdirs 4.2.0 pluggy 1.4.0 pyproject-api 1.6.1 tox 4.14.1 virtualenv 20.25.0 ```pip list
of the host Python, wheretox
is installedOutput of running tox
Output of
```console airflow 72d19565d8 @ cat tox.ini [testenv] change_dir = dev/breeze commands = pytest tests {posargs} package = editable package_root = dev/breeze airflow 72d19565d8 @ tox -rvv .pkg: 78 I find interpreter for spec PythonSpec(path=/Users/jaraco/Library/Application Support/pipx/venvs/tox/bin/python) [virtualenv/discovery/builtin.py:58] .pkg: 78 D got python info of %s from (PosixPath('/opt/homebrew/Cellar/python@3.12/3.12.2_1/Frameworks/Python.framework/Versions/3.12/bin/python3.12'), PosixPath('/Users/jaraco/Library/Application Support/virtualenv/py_info/1/b85f1c53a5d2f654313b9e766baecfcb66dffb569e1401e38d00ac755445bb26.json')) [virtualenv/app_data/via_disk_folder.py:131] .pkg: 78 D got python info of %s from (PosixPath('/opt/homebrew/opt/python@3.12/bin/python3.12'), PosixPath('/Users/jaraco/Library/Application Support/virtualenv/py_info/1/5a4cf2bb741256526a6955dc3fec99df2e3ad77a4d6165ea0a4c3b0477c721b2.json')) [virtualenv/app_data/via_disk_folder.py:131] .pkg: 78 I proposed PythonInfo(spec=CPython3.12.2.final.0-64, system=/opt/homebrew/opt/python@3.12/bin/python3.12, exe=/Users/jaraco/Library/Application Support/pipx/venvs/tox/bin/python, platform=darwin, version='3.12.2 (main, Feb 6 2024, 20:19:44) [Clang 15.0.0 (clang-1500.1.0.2.5)]', encoding_fs_io=utf-8-utf-8) [virtualenv/discovery/builtin.py:65] .pkg: 78 D accepted PythonInfo(spec=CPython3.12.2.final.0-64, system=/opt/homebrew/opt/python@3.12/bin/python3.12, exe=/Users/jaraco/Library/Application Support/pipx/venvs/tox/bin/python, platform=darwin, version='3.12.2 (main, Feb 6 2024, 20:19:44) [Clang 15.0.0 (clang-1500.1.0.2.5)]', encoding_fs_io=utf-8-utf-8) [virtualenv/discovery/builtin.py:67] .pkg: 79 D filesystem is not case-sensitive [virtualenv/info.py:26] .pkg: 89 I find interpreter for spec PythonSpec(path=/Users/jaraco/Library/Application Support/pipx/venvs/tox/bin/python) [virtualenv/discovery/builtin.py:58] .pkg: 89 I proposed PythonInfo(spec=CPython3.12.2.final.0-64, system=/opt/homebrew/opt/python@3.12/bin/python3.12, exe=/Users/jaraco/Library/Application Support/pipx/venvs/tox/bin/python, platform=darwin, version='3.12.2 (main, Feb 6 2024, 20:19:44) [Clang 15.0.0 (clang-1500.1.0.2.5)]', encoding_fs_io=utf-8-utf-8) [virtualenv/discovery/builtin.py:65] .pkg: 89 D accepted PythonInfo(spec=CPython3.12.2.final.0-64, system=/opt/homebrew/opt/python@3.12/bin/python3.12, exe=/Users/jaraco/Library/Application Support/pipx/venvs/tox/bin/python, platform=darwin, version='3.12.2 (main, Feb 6 2024, 20:19:44) [Clang 15.0.0 (clang-1500.1.0.2.5)]', encoding_fs_io=utf-8-utf-8) [virtualenv/discovery/builtin.py:67] py: 90 W remove tox env folder /Users/jaraco/draft/airflow/.tox/py [tox/tox_env/api.py:323] .pkg: 447 W remove tox env folder /Users/jaraco/draft/airflow/.tox/.pkg [tox/tox_env/api.py:323] py: 504 I create virtual environment via CPython3macOsBrew(dest=/Users/jaraco/draft/airflow/.tox/py, clear=False, no_vcs_ignore=False, global=False) [virtualenv/run/session.py:50] py: 504 D create folder /Users/jaraco/draft/airflow/.tox/py/bin [virtualenv/util/path/_sync.py:12] py: 504 D create folder /Users/jaraco/draft/airflow/.tox/py/lib/python3.12/site-packages [virtualenv/util/path/_sync.py:12] py: 504 D write /Users/jaraco/draft/airflow/.tox/py/pyvenv.cfg [virtualenv/create/pyenv_cfg.py:32] py: 504 D home = /opt/homebrew/opt/python@3.12/bin [virtualenv/create/pyenv_cfg.py:36] py: 504 D implementation = CPython [virtualenv/create/pyenv_cfg.py:36] py: 504 D version_info = 3.12.2.final.0 [virtualenv/create/pyenv_cfg.py:36] py: 504 D virtualenv = 20.25.0 [virtualenv/create/pyenv_cfg.py:36] py: 504 D include-system-site-packages = false [virtualenv/create/pyenv_cfg.py:36] py: 504 D base-prefix = /opt/homebrew/opt/python@3.12/Frameworks/Python.framework/Versions/3.12 [virtualenv/create/pyenv_cfg.py:36] py: 504 D base-exec-prefix = /opt/homebrew/opt/python@3.12/Frameworks/Python.framework/Versions/3.12 [virtualenv/create/pyenv_cfg.py:36] py: 504 D base-executable = /opt/homebrew/opt/python@3.12/bin/python3.12 [virtualenv/create/pyenv_cfg.py:36] py: 504 D symlink /opt/homebrew/opt/python@3.12/bin/python3.12 to /Users/jaraco/draft/airflow/.tox/py/bin/python [virtualenv/util/path/_sync.py:32] py: 505 D create virtualenv import hook file /Users/jaraco/draft/airflow/.tox/py/lib/python3.12/site-packages/_virtualenv.pth [virtualenv/create/via_global_ref/api.py:91] py: 505 D create /Users/jaraco/draft/airflow/.tox/py/lib/python3.12/site-packages/_virtualenv.py [virtualenv/create/via_global_ref/api.py:94] py: 505 D ============================== target debug ============================== [virtualenv/run/session.py:52] py: 505 D debug via /Users/jaraco/draft/airflow/.tox/py/bin/python '/Users/jaraco/Library/Application Support/pipx/venvs/tox/lib/python3.12/site-packages/virtualenv/create/debug.py' [virtualenv/create/creator.py:200] py: 505 D { "sys": { "executable": "/Users/jaraco/draft/airflow/.tox/py/bin/python", "_base_executable": "/opt/homebrew/Cellar/python@3.12/3.12.2_1/Frameworks/Python.framework/Versions/3.12/bin/python3.12", "prefix": "/Users/jaraco/draft/airflow/.tox/py", "base_prefix": "/opt/homebrew/opt/python@3.12/Frameworks/Python.framework/Versions/3.12", "real_prefix": null, "exec_prefix": "/Users/jaraco/draft/airflow/.tox/py", "base_exec_prefix": "/opt/homebrew/opt/python@3.12/Frameworks/Python.framework/Versions/3.12", "path": [ "/opt/homebrew/Cellar/python@3.12/3.12.2_1/Frameworks/Python.framework/Versions/3.12/lib/python312.zip", "/opt/homebrew/Cellar/python@3.12/3.12.2_1/Frameworks/Python.framework/Versions/3.12/lib/python3.12", "/opt/homebrew/Cellar/python@3.12/3.12.2_1/Frameworks/Python.framework/Versions/3.12/lib/python3.12/lib-dynload", "/Users/jaraco/draft/airflow/.tox/py/lib/python3.12/site-packages" ], "meta_path": [ "tox -rvv
Minimal example
I have not yet attempted to create a minimal example.