Add BR on python-nose

Combined build
This commit is contained in:
Orion Poplawski 2015-05-18 12:04:49 -06:00
parent 610e314143
commit 3f1c0885e1

View File

@ -13,6 +13,8 @@ Source0: https://github.com/matze/%{srcname}/archive/v%{version}.tar.gz#/
BuildArch: noarch BuildArch: noarch
BuildRequires: python2-devel BuildRequires: python2-devel
BuildRequires: python-setuptools BuildRequires: python-setuptools
# For tests
BuildRequires: python-nose
%description %description
pkgconfig is a Python module to interface with the pkg-config command line pkgconfig is a Python module to interface with the pkg-config command line
@ -31,6 +33,8 @@ If pkg-config is not on the path, raises EnvironmentError.
Summary: A Python3 interface to the pkg-config command line tool Summary: A Python3 interface to the pkg-config command line tool
BuildRequires: python3-devel BuildRequires: python3-devel
BuildRequires: python3-setuptools BuildRequires: python3-setuptools
# For tests
BuildRequires: python3-nose
%description -n python3-%{srcname} %description -n python3-%{srcname}
pkgconfig is a Python3 module to interface with the pkg-config command line pkgconfig is a Python3 module to interface with the pkg-config command line
@ -46,53 +50,41 @@ It can be used to
If pkg-config is not on the path, raises EnvironmentError. If pkg-config is not on the path, raises EnvironmentError.
%prep %prep
%setup -qc %setup -q -n %{srcname}-%{version}
mv %{srcname}-%{version} python2
# Strip shbang # Strip shbang
find -name \*.py | xargs sed -i '/^#!\/usr\/bin\/.*python/d' find -name \*.py | xargs sed -i '/^#!\/usr\/bin\/.*python/d'
cp -a python2 python3
#2to3 --write --nobackups python3
%build %build
pushd python2
%{__python2} setup.py build %{__python2} setup.py build
popd
pushd python3
%{__python3} setup.py build %{__python3} setup.py build
popd
%install %install
pushd python3
%{__python3} setup.py install --skip-build --root %{buildroot} %{__python3} setup.py install --skip-build --root %{buildroot}
popd
pushd python2
%{__python2} setup.py install --skip-build --root %{buildroot} %{__python2} setup.py install --skip-build --root %{buildroot}
popd
%check %check
pushd python2
%{__python2} setup.py test %{__python2} setup.py test
popd
pushd python3
%{__python3} setup.py test %{__python3} setup.py test
popd
%files %files
%license python2/LICENSE %license LICENSE
%doc python2/README.rst %doc README.rst
%{python2_sitelib}/* %{python2_sitelib}/*
%files -n python3-%{srcname} %files -n python3-%{srcname}
%license python3/LICENSE %license LICENSE
%doc python3/README.rst %doc README.rst
%{python3_sitelib}/* %{python3_sitelib}/*
%changelog %changelog
* Mon May 18 2015 Orion Poplawski <orion@cora.nwra.com> - 1.1.0-1
- Add BR on python-nose
- Combined build
* Sun May 17 2015 Orion Poplawski <orion@cora.nwra.com> - 1.1.0-1 * Sun May 17 2015 Orion Poplawski <orion@cora.nwra.com> - 1.1.0-1
- Initial package - Initial package