Gentoo Archives: gentoo-commits

From: Zac Medico <zmedico@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/portage:master commit in: .github/workflows/, lib/portage/, /
Date: Sat, 02 Jan 2021 08:16:24
Message-Id: 1609575345.cd98dc8ccff848e9750fb729aea3de2b6c34495c.zmedico@gentoo
1 commit: cd98dc8ccff848e9750fb729aea3de2b6c34495c
2 Author: Zac Medico <zmedico <AT> gentoo <DOT> org>
3 AuthorDate: Sat Jan 2 06:57:30 2021 +0000
4 Commit: Zac Medico <zmedico <AT> gentoo <DOT> org>
5 CommitDate: Sat Jan 2 08:15:45 2021 +0000
6 URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=cd98dc8c
7
8 ci: enable repoman tests
9
10 Bug: https://bugs.gentoo.org/763045
11 Signed-off-by: Zac Medico <zmedico <AT> gentoo.org>
12
13 .github/workflows/ci.yml | 2 +-
14 lib/portage/__init__.py | 3 ++-
15 tox.ini | 2 +-
16 3 files changed, 4 insertions(+), 3 deletions(-)
17
18 diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
19 index 09c944ba1..d4b960dc3 100644
20 --- a/.github/workflows/ci.yml
21 +++ b/.github/workflows/ci.yml
22 @@ -29,7 +29,7 @@ jobs:
23 - name: Install python dependencies
24 run: |
25 set -xe
26 - sudo apt-get install -y --no-install-recommends libxslt-dev libxml2-dev zstd
27 + sudo apt-get install -y --no-install-recommends libxslt-dev libxml2-dev libxml2-utils zstd
28 python -VV
29 python -m site
30 python -m pip install --upgrade pip
31
32 diff --git a/lib/portage/__init__.py b/lib/portage/__init__.py
33 index 621b1d99f..178d724db 100644
34 --- a/lib/portage/__init__.py
35 +++ b/lib/portage/__init__.py
36 @@ -360,7 +360,8 @@ except (ImportError, OSError) as e:
37 # END OF IMPORTS -- END OF IMPORTS -- END OF IMPORTS -- END OF IMPORTS -- END
38 # ===========================================================================
39
40 -_python_interpreter = os.path.realpath(sys.executable)
41 +_python_interpreter = (sys.executable if os.environ.get("VIRTUAL_ENV")
42 + else os.path.realpath(sys.executable))
43 _bin_path = PORTAGE_BIN_PATH
44 _pym_path = PORTAGE_PYM_PATH
45 _not_installed = os.path.isfile(os.path.join(PORTAGE_BASE_PATH, ".portage_not_installed"))
46
47 diff --git a/tox.ini b/tox.ini
48 index 27b2206d6..cebf0e49c 100644
49 --- a/tox.ini
50 +++ b/tox.ini
51 @@ -22,4 +22,4 @@ setenv =
52 commands =
53 bash -c 'rm -rf build && PYTHONPATH=$PWD/lib:$PWD/repoman/lib pylint *'
54 python -b -Wd setup.py test
55 - python -b -Wd repoman/setup.py test
56 + 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'