diff options
author | François Andriot <albator78@libertysurf.fr> | 2013-12-28 17:33:42 +0100 |
---|---|---|
committer | François Andriot <albator78@libertysurf.fr> | 2013-12-28 17:33:42 +0100 |
commit | f2b702ffebf729f632c9fe8dadd8fa06660832d7 (patch) | |
tree | aa22a785a863d87a3d96d3c1a085de79fd0b138f /redhat/dependencies | |
parent | 43ed3b6077952745b04a8c749726871f7cd76142 (diff) | |
download | tde-packaging-f2b702ffebf729f632c9fe8dadd8fa06660832d7.tar.gz tde-packaging-f2b702ffebf729f632c9fe8dadd8fa06660832d7.zip |
RPM Packaging: update python stuff
Diffstat (limited to 'redhat/dependencies')
-rw-r--r-- | redhat/dependencies/python-tqt/python-tqt-14.0.0-sip4_tqt.patch | 33 | ||||
-rw-r--r-- | redhat/dependencies/python-tqt/python-tqt-14.0.0.spec | 56 | ||||
-rw-r--r-- | redhat/dependencies/sip4-tqt/sip4-tqt.spec | 77 |
3 files changed, 103 insertions, 63 deletions
diff --git a/redhat/dependencies/python-tqt/python-tqt-14.0.0-sip4_tqt.patch b/redhat/dependencies/python-tqt/python-tqt-14.0.0-sip4_tqt.patch new file mode 100644 index 000000000..5eed97eba --- /dev/null +++ b/redhat/dependencies/python-tqt/python-tqt-14.0.0-sip4_tqt.patch @@ -0,0 +1,33 @@ +--- python-tqt/pyqtconfig.py.in.ORI 2013-12-28 15:49:34.901906208 +0100 ++++ python-tqt/pyqtconfig.py.in 2013-12-28 15:49:42.849851496 +0100 +@@ -21,7 +21,7 @@ + # modules that %Import PyTQt modules. + + +-import sipconfig ++from sip4_tqt import sipconfig + + + # These are installation specific values created when PyTQt was configured. +--- python-tqt/build.py.ORI 2013-12-28 15:52:10.923832969 +0100 ++++ python-tqt/build.py 2013-12-28 15:52:18.638779926 +0100 +@@ -35,7 +35,7 @@ + + # Get the SIP configuration. + try: +- import sipconfig ++ from sip4_tqt import sipconfig + except: + print "Unable to import the sipconfig module. Please make sure you have" + print "SIP v3.9 or later installed." +--- python-tqt/configure.py.ORI 2013-12-28 15:52:31.294692944 +0100 ++++ python-tqt/configure.py 2013-12-28 15:52:37.494650327 +0100 +@@ -28,7 +28,7 @@ + import shutil + import py_compile + +-import sipconfig ++from sip4_tqt import sipconfig + + src_dir = os.path.dirname(os.path.abspath(__file__)) + diff --git a/redhat/dependencies/python-tqt/python-tqt-14.0.0.spec b/redhat/dependencies/python-tqt/python-tqt-14.0.0.spec index 9a564dc75..8aa495772 100644 --- a/redhat/dependencies/python-tqt/python-tqt-14.0.0.spec +++ b/redhat/dependencies/python-tqt/python-tqt-14.0.0.spec @@ -1,7 +1,7 @@ %{!?python_sitearch:%global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")} %define tde_version 14.0.0 -%define tde_prefix /usr +%define tde_prefix /opt/trinity %define tde_bindir %{tde_prefix}/bin %define tde_includedir %{tde_prefix}/include %define tde_libdir %{tde_prefix}/%{_lib} @@ -14,7 +14,7 @@ License: GPL Summary: TQt bindings for Python Group: System Environment/Libraries -Obsoletes: PyQt +#Obsoletes: PyQt Obsoletes: trinity-PyQt Obsoletes: trinity-python-qt3 @@ -26,19 +26,15 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) Source0: %{name}-%{tde_version}%{?preversion:~%{preversion}}.tar.gz +Patch1: python-tqt-14.0.0-sip4_tqt.patch + BuildRequires: gcc-c++ BuildRequires: trinity-tqtinterface-devel >= %{tde_version} BuildRequires: trinity-tqscintilla-devel -%if 0%{?rhel} || 0%{?fedora} -BuildRequires: sip-devel -%endif -%if 0%{?mdkversion} || 0%{?mgaversion} -BuildRequires: python-sip -%endif -%if 0%{?suse_version} -BuildRequires: python-sip-devel -%endif +# SIP +BuildRequires: trinity-sip4-tqt-devel >= 4.10.5 +Requires: trinity-sip4-tqt >= 4.10.5 # TDE specific building variables BuildRequires: trinity-tqt3-devel >= 3.5.0 @@ -58,13 +54,15 @@ same way in both languages (with syntax differences, of course) %files %defattr(-,root,root,-) %doc NEWS README -%{python_sitearch}/qt.so -%{python_sitearch}/qtcanvas.so -%{python_sitearch}/qtnetwork.so -%{python_sitearch}/qtsql.so -%{python_sitearch}/qttable.so -%{python_sitearch}/qtui.so -%{python_sitearch}/qtxml.so +%dir %{python_sitearch}/python_tqt +%{python_sitearch}/python_tqt/__init__.py* +%{python_sitearch}/python_tqt/qt.so +%{python_sitearch}/python_tqt/qtcanvas.so +%{python_sitearch}/python_tqt/qtnetwork.so +%{python_sitearch}/python_tqt/qtsql.so +%{python_sitearch}/python_tqt/qttable.so +%{python_sitearch}/python_tqt/qtui.so +%{python_sitearch}/python_tqt/qtxml.so ########## @@ -80,7 +78,7 @@ Linux, Windows and MacOS X). %files gl %defattr(-,root,root,-) -%{python_sitearch}/qtgl.so +%{python_sitearch}/python_tqt/qtgl.so ########## @@ -96,7 +94,7 @@ PyQt Extensions. Contains: %files tqtext %defattr(-,root,root,-) -%{python_sitearch}/qtext.so +%{python_sitearch}/python_tqt/qtext.so ########## @@ -111,8 +109,8 @@ pylupdate is the counterpart for TQt's lupdate. It updates TQt Linguist translation files from Python code. %files -n trinity-pytqt-tools -%{_bindir}/pylupdate -%{_bindir}/pyuic +%{tde_bindir}/pylupdate +%{tde_bindir}/pyuic ########## @@ -128,7 +126,7 @@ packages based on them, like PyTDE. %files devel %defattr(-,root,root,-) -%{python_sitearch}/pyqtconfig.py* +%{python_sitearch}/python_tqt/pyqtconfig.py* %{_datadir}/sip/tqt/ ########## @@ -137,9 +135,11 @@ packages based on them, like PyTDE. %debug_package %endif +########## %prep %setup -q -n %{name}-%{tde_version}%{?preversion:~%{preversion}} +%patch1 -p1 -b .sip4tqt %build @@ -149,15 +149,16 @@ mkdir build cd build # WTF ? CentOS 6 ! -cp -rf ../pyuic3 ../pylupdate3 . +cp -rf ../pyuic3 ../pylupdate3 echo yes | python ../configure.py \ -c -n %{_includedir}/tqscintilla \ -q %{_datadir}/tqt3 \ -y tqt-mt \ -o %{_libdir} -u -j 10 \ - -d %{python_sitearch} \ + -d %{python_sitearch}/python_tqt \ -v %{_datadir}/sip/tqt \ + -b %{tde_bindir} \ -w \ CXXFLAGS_RELEASE="" CXXFLAGS="${RPM_OPT_FLAGS} -I%{_includedir}/tqt" STRIP="" @@ -171,9 +172,12 @@ echo yes | python ../configure.py \ %__install -d %{?buildroot}%{_datadir}/sip/ %__cp -rf sip/* %{?buildroot}%{_datadir}/sip/tqt/ +# Dummy file to make a Python module +touch %{?buildroot}%{python_sitearch}/python_tqt/__init__.py + %clean -%__rm -rf %{?buildroot} +%__rm -rf %{?buildroot}%{python_sitearch}/python_tqt/__init__.py %changelog diff --git a/redhat/dependencies/sip4-tqt/sip4-tqt.spec b/redhat/dependencies/sip4-tqt/sip4-tqt.spec index adc9f2641..1eea2f210 100644 --- a/redhat/dependencies/sip4-tqt/sip4-tqt.spec +++ b/redhat/dependencies/sip4-tqt/sip4-tqt.spec @@ -1,17 +1,20 @@ -# Some distribution already provides this package. -# Mageia 3 +# Default version for this component +%define tde_pkg sip4-tqt +%define tde_version 14.0.0 -%{!?python_sitearch:%global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")} +# If TDE is built in a specific prefix (e.g. /opt/trinity), the release will be suffixed with ".opt". +%if "%{?tde_prefix}" != "/usr" +%define _variant .opt +%endif -# Always install under standard prefix -%define tde_prefix /usr +%{!?python_sitearch:%global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")} +%define tde_bindir %{tde_prefix}/bin %define tde_includedir %{tde_prefix}/include %define tde_libdir %{tde_prefix}/%{_lib} -Name: trinity-sip4-tqt -Epoch: 2 -Version: 14.0.0 +Name: trinity-%{tde_pkg} +Version: 4.10.5 Release: %{?!preversion:1}%{?preversion:0_%{preversion}}%{?dist}%{?_variant} License: GPL Summary: Python/C++ bindings generator runtime library @@ -23,48 +26,41 @@ Packager: Francois Andriot <francois.andriot@free.fr> Prefix: %{tde_prefix} BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) -Source0: %{name}-%{version}%{?preversion:~%{preversion}}.tar.gz +Source0: %{name}-%{tde_version}%{?preversion:~%{preversion}}.tar.gz BuildRequires: trinity-tqtinterface-devel >= %{version} # TDE specific building variables -BuildRequires: cmake >= 2.8 -BuildRequires: trinity-tqt3-devel >= %{version} +BuildRequires: python +BuildRequires: trinity-tqt3-devel >= 3.5.0 %description - -########## - -%package -n python-sip -Summary: Python/C++ bindings generator runtime library -Epoch: 2 - -%description -n python-sip SIP is a tool for generating bindings for C++ classes with some ideas borrowed from SWIG, but capable of tighter bindings because of its specificity towards C++ and Python. -%post -n python-sip +%post /sbin/ldconfig || : -%postun -n python-sip +%postun /sbin/ldconfig || : -%files -n python-sip +%files %defattr(-,root,root,-) -%{python_sitearch}/sip.so -%{python_sitearch}/sipconfig.py -%{python_sitearch}/sipdistutils.py - +%dir %{python_sitearch}/sip4_tqt +%{python_sitearch}/sip4_tqt/sip.so +%{python_sitearch}/sip4_tqt/sipconfig.py* +%{python_sitearch}/sip4_tqt/sipdistutils.py* +%{python_sitearch}/sip4_tqt/__init__.py* ########## -%package -n python-sip-devel +%package devel Summary: Python/C++ bindings generator development files Group: Development/Libraries -Requires: python-sip = %{version}-%{release} +Requires: %{name} = %{version}-%{release} -%description -n python-sip-devel +%description devel SIP is a tool for generating bindings for C++ classes with some ideas borrowed from SWIG, but capable of tighter bindings because of its specificity towards C++ and Python. @@ -86,16 +82,16 @@ Features: This package contains the code generator tool and the development headers needed to develop Python bindings with sip. -%post -n python-sip-devel +%post devel /sbin/ldconfig || : -%postun -n python-sip-devel +%postun devel /sbin/ldconfig || : -%files -n python-sip-devel +%files devel %defattr(-,root,root,-) -%{_bindir}/sip -%{_includedir}/python*/sip.h +%{tde_bindir}/sip +%{tde_includedir}/sip.h ########## @@ -103,9 +99,10 @@ needed to develop Python bindings with sip. %debug_package %endif +########## %prep -%setup -q -n %{name}-%{version}%{?preversion:~%{preversion}} +%setup -q -n %{name}-%{tde_version}%{?preversion:~%{preversion}} %build @@ -115,7 +112,9 @@ export PKG_CONFIG_PATH="%{tde_libdir}/pkgconfig" mkdir build cd build python ../configure.py \ - -d %{python_sitearch} \ + -b %{tde_bindir} \ + -d %{python_sitearch}/sip4_tqt \ + -e %{tde_includedir} \ -u STRIP="" \ CFLAGS="${RPM_OPT_FLAGS} -I%{_includedir}/tqt -I%{_includedir}/tqt3" \ CFLAGS_RELEASE="" \ @@ -127,10 +126,14 @@ python ../configure.py \ %__rm -rf %{?buildroot} %__make install DESTDIR=%{?buildroot} -C build +# Dummy file to allow loading as a module +touch %{?buildroot}%{python_sitearch}/sip4_tqt/__init__.py + + %clean %__rm -rf %{?buildroot} %changelog -* Thu Feb 16 2012 Francois Andriot <francois.andriot@free.fr> - 14.0.0-1 +* Fri Jul 05 2013 Francois Andriot <francois.andriot@free.fr> - 4.10.5-1 - Initial release for TDE R14, using 'tqt3' instead of 'qt3' |