Kevin Kofler 4905506
Name:       kdevelop-python
Kevin Kofler 4905506
Version:    1.7.0
Kevin Kofler 4905506
%global py3_suffix -py3
Kevin Kofler 4905506
%global py3_tag .py3
Kevin Kofler 4905506
Release:    1%{?py3_tag}%{?dist}
Minh Ngo 71447ad
License:    GPLv2
Kevin Kofler 4905506
%global kdevelop_version %(echo %{version} | sed -e 's/^1\./4./g')
Kevin Kofler 4905506
Source0:    http://download.kde.org/stable/kdevelop/%{kdevelop_version}/src/kdev-python-%{version}%{?py3_suffix}.tar.xz
Minh Ngo 71447ad
Kevin Kofler f44065a
# ensure the installed Python 3 scripts have #!/usr/bin/env python3
Kevin Kofler f44065a
Patch0:     kdev-python-1.7.0-py3-shebang.patch
Kevin Kofler f44065a
Kevin Kofler 3440aaa
# remove bogus autogenerated set"other methods from
Kevin Kofler 3440aaa
# documentation_files/__builtin_types__.py that are actually the < and >
Kevin Kofler 3440aaa
# operators, not methods - the bogus syntax (quote in identifier) makes the
Kevin Kofler 3440aaa
# brp-python-bytecompile script choke
Kevin Kofler 3440aaa
Patch1:     kdev-python-1.7.0-py3-doc-syntax.patch
Kevin Kofler 3440aaa
Kevin Kofler 4905506
Summary:    Python 3 Plugin for KDevelop
Kevin Kofler 4905506
URL:        https://www.kdevelop.org/
Minh Ngo 71447ad
Kevin Kofler 4905506
BuildRequires:  kdelibs4-devel
Kevin Kofler e473497
BuildRequires:  qtwebkit-devel
Kevin Kofler 4905506
BuildRequires:  kdevplatform-devel >= %{version}
Kevin Kofler 4905506
BuildRequires:  python3-devel >= 3.4
Kevin Kofler 4905506
BuildRequires:  gettext
Minh Ngo 89f8dd4
Kevin Kofler 0c27e01
# force using Python 3 for bytecompiling
Kevin Kofler 0c27e01
%global __python %{__python3}
Kevin Kofler 0c27e01
Kevin Kofler 4905506
Requires:       kdevelop = 9:%{kdevelop_version}
Minh Ngo 71447ad
Minh Ngo 71447ad
%description
Kevin Kofler 4905506
Python 3 language support for the KDevelop Integrated Development Environment.
Minh Ngo 71447ad
Minh Ngo 71447ad
%prep
Kevin Kofler 4905506
%setup -qn kdev-python-%{version}%{?py3_suffix}
Kevin Kofler f44065a
# don't use backups because CMakeLists.txt installs the whole directory
Kevin Kofler 3440aaa
# shebang
Kevin Kofler f44065a
%patch0 -p1
Kevin Kofler 3440aaa
# doc-syntax
Kevin Kofler 3440aaa
%patch1 -p1
Minh Ngo 71447ad
Minh Ngo 71447ad
%build
Minh Ngo 71447ad
mkdir -p %{_target_platform}
Minh Ngo 71447ad
pushd %{_target_platform}
Minh Ngo 71447ad
%{cmake_kde4} ../
Minh Ngo 71447ad
popd
Minh Ngo 71447ad
make %{?_smp_mflags} -C %{_target_platform} 
Minh Ngo 71447ad
Minh Ngo 71447ad
%install
Kevin Kofler f44065a
make install/fast DESTDIR=%{buildroot} -C %{_target_platform}
Kevin Kofler f44065a
Kevin Kofler f44065a
# don't ship this Python 2 script, it is only used to generate the
Kevin Kofler f44065a
# documentation_files, it is not needed at runtime
Kevin Kofler f44065a
rm -f %{buildroot}%{_kde4_appsdir}/kdevpythonsupport/documentation_files/PyKDE4/parse_xml.py
Minh Ngo 71447ad
Minh Ngo 71447ad
%post -p /sbin/ldconfig
Minh Ngo 71447ad
%postun -p /sbin/ldconfig
Minh Ngo 71447ad
Minh Ngo 71447ad
%files
Kevin Kofler 4905506
%doc DESIGN TODO README
Minh Ngo 71447ad
%{_kde4_libdir}/kde4/kdevpythonlanguagesupport.so
Minh Ngo 71447ad
%{_kde4_libdir}/libkdev4pythonduchain.so
Minh Ngo 71447ad
%{_kde4_libdir}/kde4/kdevpdb.so
Minh Ngo 71447ad
%{_kde4_appsdir}/kdevappwizard/templates/*
Minh Ngo 71447ad
%{_kde4_libdir}/libkdev4pythonparser.so
Minh Ngo 71447ad
%{_kde4_libdir}/libkdev4pythoncompletion.so
Minh Ngo 71447ad
%{_kde4_datadir}/kde4/services/kdevpdb.desktop
Minh Ngo 71447ad
%{_kde4_datadir}/kde4/services/kdevpythonsupport.desktop 
Minh Ngo 71447ad
%{_kde4_appsdir}/kdevpythonsupport
Minh Ngo 71447ad
Minh Ngo 71447ad
%changelog
Kevin Kofler 6bc4e56
* Sat Sep 27 2014 Kevin Kofler <Kevin@tigcc.ticalc.org> - 1.7.0-1.py3
Kevin Kofler d35bbd2
- update to 1.7.0-py3 (#1146723)
Kevin Kofler 4905506
- specfile cleanups
Kevin Kofler f44065a
- ensure the installed Python 3 scripts have #!/usr/bin/env python3
Kevin Kofler 4905506
1ae8b44
* Sun Jun 08 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.4.1-5
1ae8b44
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
1ae8b44
73cb04e
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.4.1-4
73cb04e
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
73cb04e
Minh Ngo 89f8dd4
* Fri Feb 15 2013 Minh Ngo <minh@fedoraproject.org> 1.4.1-3
Minh Ngo 89f8dd4
- possible fixing a bug with libpython2.7-kdevelop.so.1.0 requirement
Minh Ngo 89f8dd4
Minh Ngo 71447ad
* Thu Feb 14 2013 Minh Ngo <minh@fedoraproject.org> 1.4.1-2
Minh Ngo 71447ad
- have added _kde4_appsdir macro
Minh Ngo 71447ad
- have dropped updata-mime-database scriptlets
Minh Ngo 71447ad
- have omitted cmake requirement
Minh Ngo 71447ad
- have removed desktop-file-install script
Minh Ngo 71447ad
- removing python2.7 hardcode
Minh Ngo 71447ad
Kevin Kofler 246537b
* Sat Dec 01 2012 Minh Ngo <minh@fedoraproject.org> 1.4.1-1
Kevin Kofler 246537b
- initial build