# OPEN-ISSUE: Documentation license is missing. # The documents aren't normally build. Build them with "--without=check". %bcond_with docs # Upstream source information. %global upstream_owner AdaCore %global upstream_name e3-testsuite %global upstream_version 27.3 %global upstream_gittag v%{upstream_version} %global pypi_tarball e3_testsuite-%{upstream_version}.tar.gz %global pypi_sha256 bf4d65997fe2dc4eb8b7a34dcafe1db85210628473365ee2aa1a013d7769d38e # Python Package Index name. %global pypi_name %{upstream_name} Name: python-%{pypi_name} Version: %{upstream_version} Release: %autorelease Summary: Generic testsuite framework in Python License: GPL-3.0-only URL: https://github.com/%{upstream_owner}/%{upstream_name} Source: https://files.pythonhosted.org/packages/b6/09/4ed060a0a520d087dbe96c5d19bfffa77e22bd103bbda03f46155d326068/%{pypi_tarball} BuildArch: noarch BuildRequires: python3-devel BuildRequires: python3-tox BuildRequires: python3-coverage %if %{with docs} BuildRequires: python3-sphinx BuildRequires: python3-sphinx-latex BuildRequires: python3-sphinx_rtd_theme BuildRequires: latexmk BuildRequires: make %endif # [Fedora-specific] Add missing artifact required by testsuite. Patch: %{name}-add-missing-test-artifact.patch %global common_description_en \ A testsuite driver for the e3 build system. %description %{common_description_en} ################# ## Subpackages ## ################# %package -n python3-%{pypi_name} Summary: %{summary} %description -n python3-%{pypi_name} %{common_description_en} %if %{with docs} %package doc Summary: Documentation for e3-testsuite BuildArch: noarch %description doc %{common_description_en} This package contains the documentation in HTML. %endif ############# ## Prepare ## ############# %prep # Verify checksum, we're downloading this from PyPI. sha256sum --check << _DOC %{pypi_sha256} %{_sourcedir}/%{pypi_tarball} _DOC %autosetup -n e3_testsuite-%{upstream_version} -p1 # Add missing empty dir required by the testsuite. mkdir tests/tests/adacore-tests/T415-995 ############################ ## Generate BuildRequires ## ############################ %generate_buildrequires %pyproject_buildrequires -t ########### ## Build ## ########### %build # Build the package. %pyproject_wheel # Build the documentation. %if %{with docs} make -C doc html %endif ############# ## Install ## ############# %install # Need to disable the -P flag, but not sure why. The flag is being added to the # shebang line as of Fedora 37, but causes the testsuite fail. The -P flag # prevents the path of the executable to be added to the path. Maybe this causes # problems for scripts being executed using e3.os.process.Run(...)? %undefine _py3_shebang_P %pyproject_install %pyproject_save_files -l e3 # Copy the documentation. %if %{with docs} mkdir --parents %{buildroot}%{_pkgdocdir}/html cp --recursive --preserve=timestamps \ doc/_build/html/* %{buildroot}%{_pkgdocdir}/html %endif ########### ## Check ## ########### %check %tox ########### ## Files ## ########### %files -n python3-%{pypi_name} -f %pyproject_files %doc README* NEWS* %{_bindir}/e3-find-skipped-tests %{_bindir}/e3-test %{_bindir}/e3-testsuite-report %{_bindir}/e3-opt-check %{_bindir}/e3-opt-parser %{_bindir}/e3-run-test-fragment %{_bindir}/e3-convert-xunit %if %{with docs} %files doc %dir %{_pkgdocdir} %{_pkgdocdir}/html # Remove Sphinx-generated files that aren't needed in the package. %exclude %{_pkgdocdir}/html/objects.inv %exclude %{_pkgdocdir}/html/objects.inv %endif ############### ## Changelog ## ############### %changelog %autochangelog