Skip to content

Commit 51dfec1

Browse files
committed
Allow spaces in $DNF_INSTALL
Resolves: #74
1 parent 252397a commit 51dfec1

File tree

3 files changed

+9
-1
lines changed

3 files changed

+9
-1
lines changed

.github/workflows/build-and-push.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,11 @@ jobs:
6464
TOXENV: ${{ matrix.toxenv }}
6565
run: |
6666
docker run --rm --platform linux/${{ matrix.arch }} -e DNF_INSTALL="libffi-devel pkgconfig(libgit2) /usr/bin/cowsay" fedorapython/fedora-python-tox:${{ matrix.arch }} sh -c "/run_tests.sh; pip install -I --no-deps --compile --no-binary :all: cffi pygit2~=1.14.0 && cowsay DONE"
67+
- name: Test dnf install with version specifiers
68+
env:
69+
TOXENV: ${{ matrix.toxenv }}
70+
run: |
71+
docker run --rm --platform linux/${{ matrix.arch }} -e DNF_INSTALL="'pytest > 7' 'cowsay > 2'" fedorapython/fedora-python-tox:${{ matrix.arch }} sh -c "/run_tests.sh; cowsay DONE"
6772
- name: Test external project with WORKDIR
6873
run: |
6974
docker run --rm --platform linux/${{ matrix.arch }} -e TOXENV=py310-minimal -e GIT_URL=https://github.com/trezor/trezor-firmware.git -e WORKDIR=python fedorapython/fedora-python-tox:${{ matrix.arch }}

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,9 @@ You can install packages by any RPM *Provides*, for example:
179179
* pkgconfig names, e.g. `pkgconfig(libgit2)`, or
180180
* commands, e.g. `/usr/bin/cowsay`.
181181

182+
Complex specifications including spaces have to be enclosed in single quotes
183+
inside the double quotes. For example: `-e DNF_INSTALL="libyaml-devel 'pytest > 7'"`
184+
182185
# WORKDIR
183186

184187
If your `tox.ini` file is not in the root directory of your project, set `WORKDIR` to the path you want to cd to before the tests are executed.

run_tests.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ if [ ! -z $GIT_URL ]; then
1010
fi
1111

1212
if [ ! -z "$DNF_INSTALL" ]; then
13-
dnf -y --setopt=tsflags=nodocs --setopt=deltarpm=false install $DNF_INSTALL
13+
echo $DNF_INSTALL | xargs dnf -y --setopt=tsflags=nodocs --setopt=deltarpm=false install
1414
fi
1515

1616
# Mark the current directory as safe for Git:

0 commit comments

Comments
 (0)