diff --git a/python-isort.changes b/python-isort.changes index 07a96c7..dda0bd6 100644 --- a/python-isort.changes +++ b/python-isort.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Fri Oct 9 16:47:11 UTC 2020 - Benjamin Greiner + +- Fix wheel building and installation for testing exampleprojects + ------------------------------------------------------------------- Thu Oct 8 15:56:53 UTC 2020 - Benjamin Greiner diff --git a/python-isort.spec b/python-isort.spec index c1267ce..1542a70 100644 --- a/python-isort.spec +++ b/python-isort.spec @@ -80,7 +80,7 @@ chmod -x LICENSE %build %pyproject_wheel -%if ! %{with test} +%if !%{with test} %install %pyproject_install %python_clone -a %{buildroot}%{_bindir}/isort @@ -90,9 +90,16 @@ chmod -x LICENSE %if %{with test} %check ORIGPATH=$PATH -%{python_expand # install example projects for testing +%{python_expand # install isort and required example projects into custom root +exampleprojects="example_shared_isort_profile example_isort_formatting_plugin" +for eproj in $exampleprojects; do + pushd $eproj + %pyproject_wheel + popd + mv $eproj/$eproj*.whl . +done mkdir isort-test-%{$python_bin_suffix} -for proj in isort*.whl example_shared_isort_profile example_isort_formatting_plugin; do +for proj in isort $exampleprojects; do $python -m pip install --verbose \ --root $(pwd)/isort-test-%{$python_bin_suffix} \ --no-deps \ @@ -100,7 +107,7 @@ for proj in isort*.whl example_shared_isort_profile example_isort_formatting_plu --no-build-isolation \ --progress-bar off \ --disable-pip-version-check \ - $proj + ${proj}*.whl done export PATH="$(pwd)/isort-test-%{$python_bin_suffix}/usr/bin:$ORIGPATH" @@ -118,7 +125,7 @@ pytest-%{$python_bin_suffix} -v \ } %endif -%if ! %{with test} +%if !%{with test} %post %python_install_alternative isort