From b1f03d7f5190af110bdd07f8be54c129ccb6e053 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Wed, 23 Sep 2020 11:43:35 +0200 Subject: [PATCH] Add integration test for package with setuptools setup_requires --- tests/python-distroinfo.spec | 50 ++++++++++++++++++++++++++++++++++++ tests/tests.yml | 3 +++ 2 files changed, 53 insertions(+) create mode 100644 tests/python-distroinfo.spec diff --git a/tests/python-distroinfo.spec b/tests/python-distroinfo.spec new file mode 100644 index 0000000..0630478 --- /dev/null +++ b/tests/python-distroinfo.spec @@ -0,0 +1,50 @@ +Name: python-distroinfo +Version: 0.3.2 +Release: 0%{?dist} +Summary: Parsing and querying distribution metadata stored in text/YAML files +License: ASL 2.0 +URL: https://github.com/softwarefactory-project/distroinfo +Source0: %{pypi_source distroinfo} +BuildArch: noarch + +BuildRequires: pyproject-rpm-macros +BuildRequires: python3-devel +BuildRequires: python3-pytest +BuildRequires: git-core + +%description +This package uses setuptools and pbr. +It has setup_requires and tests that %%pyproject_buildrequires correctly +handles that including runtime requirements. + +%package -n python3-distroinfo +Summary: %{summary} + +%description -n python3-distroinfo +... + + +%prep +%autosetup -p1 -n distroinfo-%{version} + + +%generate_buildrequires +%pyproject_buildrequires -r + + +%build +%pyproject_wheel + + +%install +%pyproject_install +%pyproject_save_files distroinfo + + +%check +%pytest + + +%files -n python3-distroinfo -f %{pyproject_files} +%doc README.rst AUTHORS +%license LICENSE diff --git a/tests/tests.yml b/tests/tests.yml index e03bd53..94ad7fb 100644 --- a/tests/tests.yml +++ b/tests/tests.yml @@ -25,6 +25,9 @@ - clikit: dir: . run: ./mocktest.sh python-clikit + - distroinfo: + dir: . + run: ./mocktest.sh python-distroinfo - tldr: dir: . run: ./mocktest.sh tldr