Blob Blame History Raw
# This package depends on automagic byte compilation
# https://fedoraproject.org/wiki/Changes/No_more_automagic_Python_bytecompilation_phase_2
%global _python_bytecompile_extra 1


Name:       kdevelop-python
Version:    5.5.2
%global py3_suffix -py3
%global py3_tag .py3
Release:    1%{?dist}
License:    GPLv2
Source0:    http://download.kde.org/stable/kdevelop/%{version}/src/kdev-python-%{version}.tar.xz

## kdevelop-pg-qt FTBFS s390x
ExcludeArch: s390x

# ensure the installed Python 3 scripts have #!/usr/bin/env python3
Patch0:     kdev-python-1.7.0-py3-shebang.patch

# remove bogus autogenerated set"other methods from
# documentation_files/__builtin_types__.py that are actually the < and >
# operators, not methods - the bogus syntax (quote in identifier) makes the
# brp-python-bytecompile script choke
Patch1:     kdev-python-1.7.0-py3-doc-syntax.patch

# Fix syntax error due to async being a reserved keyword in python3.7
Patch2:     kdev-python_async.patch

Summary:    Python 3 Plugin for KDevelop
URL:        https://www.kdevelop.org/

BuildRequires:  kdevelop-devel >= %{version}
BuildRequires:  python3-devel >= 3.4
BuildRequires:  gettext

BuildRequires:  kf5-rpm-macros
BuildRequires:  extra-cmake-modules
BuildRequires:  grantlee-qt5-devel
BuildRequires:  kf5-ki18n-devel
BuildRequires:  kf5-knotifyconfig-devel
BuildRequires:  kf5-knewstuff-devel
BuildRequires:  kf5-kcmutils-devel
BuildRequires:  kf5-ktexteditor-devel
BuildRequires:  kf5-threadweaver-devel
BuildRequires:  kf5-kitemmodels-devel
BuildRequires:  kf5-kdelibs4support-devel

BuildRequires:  qt5-qtbase-devel
BuildRequires:  qt5-qtwebkit-devel

# force using Python 3 for bytecompiling
%global __python %{__python3}

%{?kdevelop_requires}

%description
Python 3 language support for the KDevelop Integrated Development Environment.


%prep
%setup -qn kdev-python-%{version}

# don't use backups because CMakeLists.txt installs the whole directory
# shebang
%patch0 -p1
# doc-syntax
%patch1 -p1
# async
%patch2 -p1

%build
mkdir %{_target_platform}
pushd %{_target_platform}
%{cmake_kf5} ..
popd

make %{?_smp_mflags} -C %{_target_platform}


%install
make install/fast DESTDIR=%{buildroot} -C %{_target_platform}

# don't ship this Python 2 script, it is only used to generate the
# documentation_files, it is not needed at runtime
rm -f %{buildroot}%{_datadir}/kdevpythonsupport/documentation_files/PyKDE4/parse_xml.py

# TODO Enable translations in stable build
%find_lang kdevpython

%ldconfig_scriptlets

%files -f kdevpython.lang
%doc DESIGN README
%{_libdir}/libkdevpythonduchain.so
%{_libdir}/libkdevpythonparser.so
%{_libdir}/libkdevpythoncompletion.so
%{_datadir}/kdevpythonsupport
%{_datadir}/kdevappwizard/templates/*
%{_kf5_qtplugindir}/kdevplatform/33/kdevpdb.so
%{_kf5_qtplugindir}/kdevplatform/33/kdevpythonlanguagesupport.so
%{_datadir}/qlogging-categories5/kdevpythonsupport.categories
%{_datadir}/metainfo/org.kde.kdev-python.metainfo.xml

%changelog
* Tue Jun 02 2020 Jan Grulich <jgrulich@redhat.com> - 5.5.2-1
- 5.5.2

* Tue May 26 2020 Miro Hrončok <mhroncok@redhat.com> - 5.5.1-2
- Rebuilt for Python 3.9

* Wed May 06 2020 Jan Grulich <jgrulich@redhat.com> - 5.5.1-1
- 5.5.1

* Mon Feb 03 2020 Jan Grulich <jgrulich@redhat.com> - 5.5.0-1
- 5.5.0

* Wed Jan 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 5.4.6-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild

* Tue Jan 07 2020 Jan Grulich <jgrulich@redhat.com> - 5.4.6-1
- 5.4.6

* Tue Dec 03 2019 Jan Grulich <jgrulich@redhat.com> - 5.4.5-1
- 5.4.5

* Tue Nov 05 2019 Jan Grulich <jgrulich@redhat.com> - 5.4.4-1
- 5.4.4

* Thu Oct 24 2019 Jan Grulich <jgrulich@redhat.com> - 5.4.3-2
- Build against Python 3.8

* Tue Oct 22 2019 Jan Grulich <jgrulich@redhat.com> - 5.4.3-1
- 5.4.3

* Tue Sep 03 2019 Jan Grulich <jgrulich@redhat.com> - 5.4.2-1.py3
- 5.4.2

* Mon Aug 19 2019 Miro Hrončok <mhroncok@redhat.com> - 5.4.1-2.py3
- Rebuilt for Python 3.8

* Tue Aug 13 2019 Jan Grulich <jgrulich@redhat.com> - 5.4.1-1.py3
- 5.4.1

* Wed Aug 07 2019 Jan Grulich <jgrulich@redhat.com> - 5.4.0-1.py3
- 5.4.0

* Thu Jul 25 2019 Fedora Release Engineering <releng@fedoraproject.org> - 5.3.3-2.py3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild

* Thu Jul 18 2019 Jan Grulich <jgrulich@redhat.com> - 5.3.3-1.py3
- 5.3.3

* Fri Mar 15 2019 Jan Grulich <jgrulich@redhat.com> - 5.3.2-1.py3
- 5.3.2

* Fri Feb 01 2019 Fedora Release Engineering <releng@fedoraproject.org> - 5.3.1-2.py3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild

* Tue Dec 11 2018 Jan Grulich <jgrulich@redhat.com> - 5.3.1-1.py3
- 5.3.1

* Wed Nov 14 2018 Jan Grulich <jgrulich@redhat.com> - 5.3.0-1.py3
- 5.3.0

* Tue Oct 02 2018 Jan Grulich <jgrulich@redhat.com> - 5.2.80-1.py3
- 5.2.80 (beta)

* Mon Aug 27 2018 Jan Grulich <jgrulich@redhat.com> - 5.2.4-1.py3
- 5.2.4

* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 5.2.3-4.py3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild

* Thu Jul 12 2018 Sandro Mani <manisandro@gmail.com> - 5.2.3-3.py3
- Fix FTBFS due to syntax error due to async being a reserved keyword in python3.7

* Tue Jun 19 2018 Miro Hrončok <mhroncok@redhat.com> - 5.2.3-2.py3
- Rebuilt for Python 3.7

* Mon May 21 2018 Jan Grulich <jgrulich@redhat.com> - 5.2.3-1.py3
- Update to 5.2.3

* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 5.2.1-2.py3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild

* Fri Nov 24 2017 Jan Grulich <jgrulich@redhat.com> - 5.2.1-1
- Update to 5.2.1

* Tue Nov 14 2017 Jan Grulich <jgrulich@redhat.com> - 5.2.0-1
- Update to 5.2.0

* Fri Oct 06 2017 Jan Grulich <jgrulich@redhat.com> - 5.1.80
- Update to 5.1.80 (beta)

* Tue Aug 29 2017 Jan Grulich <jgrulich@redhat.com> - 5.1.2-1
- Update to 5.1.2

* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 5.1.1-3.py3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild

* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 5.1.1-2.py3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild

* Mon May 29 2017 Jan Grulich <jgrulich@redhat.com> - 5.1.1-1
- Update to 5.1.1

* Mon Mar 20 2017 Jan Grulich <jgrulich@redhat.com> - 5.1.0-1
- Update to 5.1.0

* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 5.0.80-2.py3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild

* Tue Jan 17 2017 Jan Grulich <jgrulich@redhat.com> - 5.0.80-1
- Update to 5.0.80 (beta)

* Thu Dec 22 2016 Jan Grulich <jgrulich@redhat.com> - 5.0.3-3.py3
- Add support for Python 3.6 (taken from upstream)

* Mon Dec 19 2016 Miro Hrončok <mhroncok@redhat.com> - 5.0.3-2.py3
- Rebuild for Python 3.6

* Fri Dec 02 2016 Jan Grulich <jgrulich@redhat.com> - 5.0.3-1
- Update to 5.0.3

* Mon Oct 17 2016 Jan Grulich <jgrulich@redhat.com> - 5.0.2-1
- Update to 5.0.2

* Mon Sep 19 2016 Jan Grulich <jgrulich@redhat.com> - 5.0.1-1
- Update to 5.0.1

* Wed Sep 07 2016 Rex Dieter <rdieter@fedoraproject.org> - 5.0.0-2
- use %%{?kdevelop_requires}, cosmetics

* Wed Aug 31 2016 Helio Chissini de Castro <helio@kde.org> - 5.0.0-1
- New upstream version

* Wed Jun 08 2016 Jan Grulich <jgrulich@redhat.com> - 5.0.0-0.1.20160608git.py3
- Package latest git snapshot to address GCC 6 related crashes
  Resolves: bz#1343439

* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 4.90.91-2.py3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild

* Tue Jan 26 2016 Jan Grulich <jgrulich@redhat.com> - 4.90.91-1.py3
- Update to 4.90.91 (beta 2)

* Thu Nov 12 2015 Jan Grulich <jgrulich@redhat.com> - 4.90.90-1.py3
- Update to 4.90.90 (beta 1)

* Tue Nov 10 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.7.2-2.py3
- Rebuilt for https://fedoraproject.org/wiki/Changes/python3.5

* Mon Oct 12 2015 Jan Grulich <jgrulich@redhat.com> - 1.7.2-1.py3
- Update to 1.7.2

* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.7.1-3.py3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild

* Sat May 02 2015 Kalev Lember <kalevlember@gmail.com> - 1.7.1-2.py3
- Rebuilt for GCC 5 C++11 ABI change

* Tue Feb 10 2015 Jan Grulich <jgrulich@redhat.com> - 1.7.1-1.py3
- update to 1.7.1-py3

* Sat Sep 27 2014 Kevin Kofler <Kevin@tigcc.ticalc.org> - 1.7.0-1.py3
- update to 1.7.0-py3 (#1146723)
- specfile cleanups
- ensure the installed Python 3 scripts have #!/usr/bin/env python3

* Sun Jun 08 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.4.1-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild

* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.4.1-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild

* Fri Feb 15 2013 Minh Ngo <minh@fedoraproject.org> 1.4.1-3
- possible fixing a bug with libpython2.7-kdevelop.so.1.0 requirement

* Thu Feb 14 2013 Minh Ngo <minh@fedoraproject.org> 1.4.1-2
- have added _kde4_appsdir macro
- have dropped updata-mime-database scriptlets
- have omitted cmake requirement
- have removed desktop-file-install script
- removing python2.7 hardcode

* Sat Dec 01 2012 Minh Ngo <minh@fedoraproject.org> 1.4.1-1
- initial build