Add integartion test for the dist generator
This commit is contained in:
parent
54e4aa751b
commit
6beec97e9e
35
tests/pythondist.sh
Executable file
35
tests/pythondist.sh
Executable file
@ -0,0 +1,35 @@
|
||||
#!/usr/bin/bash -eux
|
||||
X_Y=$(rpm --eval '%python3_version')
|
||||
RPMDIR=$(rpm --eval '%_topdir')/RPMS/noarch
|
||||
|
||||
mkdir -p $(rpm --eval '%_topdir')/SOURCES/
|
||||
|
||||
spectool -g -R pythondist.spec
|
||||
rpmbuild -ba pythondist.spec
|
||||
|
||||
|
||||
rpm -qp --provides ${RPMDIR}/python3-zope-component-4.3.0-0.noarch.rpm | grep '^python3dist(zope\.component)'
|
||||
rpm -qp --provides ${RPMDIR}/python3-zope-component-4.3.0-0.noarch.rpm | grep '^python3dist(zope-component)'
|
||||
rpm -qp --provides ${RPMDIR}/python3-zope-component-4.3.0-0.noarch.rpm | grep '^python'$X_Y'dist(zope\.component)'
|
||||
rpm -qp --provides ${RPMDIR}/python3-zope-component-4.3.0-0.noarch.rpm | grep '^python'$X_Y'dist(zope-component)'
|
||||
|
||||
rpm -qp --requires ${RPMDIR}/python3-zope-component-4.3.0-0.noarch.rpm | grep '^python'$X_Y'dist(zope\.event)'
|
||||
rpm -qp --requires ${RPMDIR}/python3-zope-component-4.3.0-0.noarch.rpm | grep '^python'$X_Y'dist(zope\.interface)'
|
||||
|
||||
|
||||
rpm -qp --provides ${RPMDIR}/python37-zope-component-4.3.0-0.noarch.rpm | grep '^python3dist(zope\.component)' && exit 1 || true
|
||||
rpm -qp --provides ${RPMDIR}/python37-zope-component-4.3.0-0.noarch.rpm | grep '^python3dist(zope-component)' && exit 1 || true
|
||||
rpm -qp --provides ${RPMDIR}/python37-zope-component-4.3.0-0.noarch.rpm | grep '^python3\.7dist(zope\.component)'
|
||||
rpm -qp --provides ${RPMDIR}/python37-zope-component-4.3.0-0.noarch.rpm | grep '^python3\.7dist(zope-component)'
|
||||
|
||||
rpm -qp --requires ${RPMDIR}/python37-zope-component-4.3.0-0.noarch.rpm | grep '^python3\.7dist(zope\.event)'
|
||||
rpm -qp --requires ${RPMDIR}/python37-zope-component-4.3.0-0.noarch.rpm | grep '^python3\.7dist(zope\.interface)'
|
||||
|
||||
|
||||
rpm -qp --provides ${RPMDIR}/python310-zope-component-4.3.0-0.noarch.rpm | grep '^python3dist(zope\.component)' && exit 1 || true
|
||||
rpm -qp --provides ${RPMDIR}/python310-zope-component-4.3.0-0.noarch.rpm | grep '^python3dist(zope-component)' && exit 1 || true
|
||||
rpm -qp --provides ${RPMDIR}/python310-zope-component-4.3.0-0.noarch.rpm | grep '^python3\.10dist(zope\.component)'
|
||||
rpm -qp --provides ${RPMDIR}/python310-zope-component-4.3.0-0.noarch.rpm | grep '^python3\.10dist(zope-component)'
|
||||
|
||||
rpm -qp --requires ${RPMDIR}/python310-zope-component-4.3.0-0.noarch.rpm | grep '^python3\.10dist(zope\.event)'
|
||||
rpm -qp --requires ${RPMDIR}/python310-zope-component-4.3.0-0.noarch.rpm | grep '^python3\.10dist(zope\.interface)'
|
59
tests/pythondist.spec
Normal file
59
tests/pythondist.spec
Normal file
@ -0,0 +1,59 @@
|
||||
Name: pythondist
|
||||
Version: 4.3.0
|
||||
Release: 0
|
||||
Summary: ...
|
||||
License: ZPLv2.1
|
||||
Source0: %{pypi_source zope.component}
|
||||
BuildArch: noarch
|
||||
BuildRequires: python3-devel
|
||||
BuildRequires: python3-setuptools
|
||||
|
||||
# Turn off Python bytecode compilation because the build would fail without Python 3.7/3.10
|
||||
%define __brp_python_bytecompile %{nil}
|
||||
|
||||
%description
|
||||
...
|
||||
|
||||
%package -n python3-zope-component
|
||||
Summary: ...
|
||||
%description -n python3-zope-component
|
||||
...
|
||||
|
||||
%package -n python37-zope-component
|
||||
Summary: ...
|
||||
%description -n python37-zope-component
|
||||
...
|
||||
|
||||
%package -n python310-zope-component
|
||||
Summary: ...
|
||||
%description -n python310-zope-component
|
||||
...
|
||||
|
||||
%prep
|
||||
%autosetup -n zope.component-%{version}
|
||||
|
||||
%build
|
||||
%py3_build
|
||||
|
||||
%install
|
||||
%py3_install
|
||||
|
||||
mkdir -p %{buildroot}/usr/lib/python3.7/site-packages
|
||||
cp -a %{buildroot}%{python3_sitelib}/zope.component-%{version}-py%{python3_version}.egg-info \
|
||||
%{buildroot}/usr/lib/python3.7/site-packages/zope.component-%{version}-py3.7.egg-info
|
||||
|
||||
mkdir -p %{buildroot}/usr/lib/python3.10/site-packages
|
||||
cp -a %{buildroot}%{python3_sitelib}/zope.component-%{version}-py%{python3_version}.egg-info \
|
||||
%{buildroot}/usr/lib/python3.10/site-packages/zope.component-%{version}-py3.10.egg-info
|
||||
|
||||
%files -n python3-zope-component
|
||||
%license LICENSE.txt
|
||||
%{python3_sitelib}/*
|
||||
|
||||
%files -n python37-zope-component
|
||||
%license LICENSE.txt
|
||||
/usr/lib/python3.7/site-packages/zope.component-%{version}-py3.7.egg-info/
|
||||
|
||||
%files -n python310-zope-component
|
||||
%license LICENSE.txt
|
||||
/usr/lib/python3.10/site-packages/zope.component-%{version}-py3.10.egg-info/
|
@ -24,6 +24,9 @@
|
||||
- pythonname:
|
||||
dir: .
|
||||
run: ./pythonname.sh
|
||||
- pythondist:
|
||||
dir: .
|
||||
run: ./pythondist.sh
|
||||
- prepare-test-data:
|
||||
dir: .
|
||||
run: tar -xvf test-sources-*.tar.gz -C ./tests/data/scripts_pythondistdeps/
|
||||
@ -33,6 +36,7 @@
|
||||
run: python3 -m pytest --capture=no -vvv
|
||||
required_packages:
|
||||
- rpm-build
|
||||
- rpmdevtools
|
||||
- python3-devel
|
||||
- python3-pip
|
||||
- python3-pytest
|
||||
|
Loading…
Reference in New Issue
Block a user