commit: cd98dc8ccff848e9750fb729aea3de2b6c34495c Author: Zac Medico <zmedico <AT> gentoo <DOT> org> AuthorDate: Sat Jan 2 06:57:30 2021 +0000 Commit: Zac Medico <zmedico <AT> gentoo <DOT> org> CommitDate: Sat Jan 2 08:15:45 2021 +0000 URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=cd98dc8c
ci: enable repoman tests Bug: https://bugs.gentoo.org/763045 Signed-off-by: Zac Medico <zmedico <AT> gentoo.org> .github/workflows/ci.yml | 2 +- lib/portage/__init__.py | 3 ++- tox.ini | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 09c944ba1..d4b960dc3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -29,7 +29,7 @@ jobs: - name: Install python dependencies run: | set -xe - sudo apt-get install -y --no-install-recommends libxslt-dev libxml2-dev zstd + sudo apt-get install -y --no-install-recommends libxslt-dev libxml2-dev libxml2-utils zstd python -VV python -m site python -m pip install --upgrade pip diff --git a/lib/portage/__init__.py b/lib/portage/__init__.py index 621b1d99f..178d724db 100644 --- a/lib/portage/__init__.py +++ b/lib/portage/__init__.py @@ -360,7 +360,8 @@ except (ImportError, OSError) as e: # END OF IMPORTS -- END OF IMPORTS -- END OF IMPORTS -- END OF IMPORTS -- END # =========================================================================== -_python_interpreter = os.path.realpath(sys.executable) +_python_interpreter = (sys.executable if os.environ.get("VIRTUAL_ENV") + else os.path.realpath(sys.executable)) _bin_path = PORTAGE_BIN_PATH _pym_path = PORTAGE_PYM_PATH _not_installed = os.path.isfile(os.path.join(PORTAGE_BASE_PATH, ".portage_not_installed")) diff --git a/tox.ini b/tox.ini index 27b2206d6..cebf0e49c 100644 --- a/tox.ini +++ b/tox.ini @@ -22,4 +22,4 @@ setenv = commands = bash -c 'rm -rf build && PYTHONPATH=$PWD/lib:$PWD/repoman/lib pylint *' python -b -Wd setup.py test - python -b -Wd repoman/setup.py test + bash -c 'if python -c "import lxml.etree"; then python -b -Wd repoman/setup.py test; else echo "repoman tests skipped due to lxml breakage"; fi'
