diff --git a/python-pycxx.spec b/python-pycxx.spec index c01d79f..c9784c3 100644 --- a/python-pycxx.spec +++ b/python-pycxx.spec @@ -1,6 +1,3 @@ -%if 0%{?rhel} && 0%{?rhel} <= 6 -%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} -%endif %global modname pycxx # Specify '--without=python3' to NOT build the python 3 RPM @@ -21,14 +18,12 @@ URL: http://CXX.sourceforge.net/ BuildArch: noarch -# SVN version contains updates for Python3 Source0: http://downloads.sourceforge.net/cxx/%{modname}-%{version}.tar.gz # Patch0: remove unnecessary 'Src/' directory from include path in sources Patch0: %{name}-%{version}-change-include-paths.patch # Patch1: fix several problems with install, esp. omitted files, python # v2/v3 awareness Patch1: %{name}-%{version}-setup.py.patch - # https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/message/ZALDNFOZO6DLRXOS6J7EA7WFHMGE3UAF/ Patch2: %{name}-%{version}-python37.patch @@ -36,7 +31,6 @@ BuildRequires: python2-devel %if %{with_python3} BuildRequires: python3-devel %endif -BuildRequires: gcc-c++ %global _description\ PyCXX is a set of classes to help create extensions of Python in the\ @@ -85,20 +79,15 @@ for Python 3. There is no non-devel package needed. %build -%{py2_build} +# Nothing to build. %install -INSTALL='setup.py install - --root=%{buildroot} - --prefix=%{_prefix} - --install-headers=%{_includedir}/CXX - --install-data=%{_usrsrc}' - -%{__python2} $INSTALL +%global py_install_args --prefix=/usr --install-headers=/usr/include/CXX --install-data=/usr/src +%py2_install -- %{py_install_args} %if %{with_python3} -%{__python3} $INSTALL +%py3_install -- %{py_install_args} %endif # Write pkg-config PyCXX.pc file @@ -116,6 +105,11 @@ Cflags: -I\${includedir} EOF +%check +export PKG_CONFIG_PATH=%{buildroot}%{_datadir}/pkgconfig:%{buildroot}%{_libdir}/pkgconfig +test "$(pkg-config --modversion PyCXX)" = "%{version}" + + %files -n python2-%{modname}-devel %doc README.html COPYRIGHT Doc/Python2/ %dir %{_includedir}/CXX @@ -146,14 +140,11 @@ EOF %endif -%check -export PKG_CONFIG_PATH=%{buildroot}%{_datadir}/pkgconfig:%{buildroot}%{_libdir}/pkgconfig -test "$(pkg-config --modversion PyCXX)" = "%{version}" - - %changelog * Mon Feb 18 2019 Richard Shaw - 7.1.1-1 - Update to 7.1.1. +- Clean up python install to be more guidelines compliant. +- Remove gcc-c++ from build requirements as this is a noarch package. * Sat Feb 02 2019 Fedora Release Engineering - 7.1.0-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild