File python-eric6.spec of Package python-eric6

#
# spec file for package python-eric6
#
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
#


%define eric    eric6
Name:           python-%{eric}
Version:        18.04
Release:        0
Summary:        Python IDE based on Qt5
License:        GPL-3.0+
Group:          Development/Tools/IDE
Url:            http://eric-ide.python-projects.org/
Source:         https://downloads.sourceforge.net/project/eric-ide/eric6/stable/%{version}/%{eric}-%{version}.tar.gz
BuildRequires:  fdupes
BuildRequires:  python3-qscintilla-qt5
BuildRequires:  python3-qt5
BuildRequires:  python3-xml
BuildRequires:  update-desktop-files
Requires:       python3-qscintilla-qt5
Requires:       python3-qt5
Requires:       python3-xml
Recommends:     python3-cx_Freeze
Recommends:     python3-doc
Recommends:     python3-enchant >= 1.5.3
Recommends:     python3-pylint >= 0.18.0
Recommends:     python3-pysvn >= 1.7.0
Recommends:     python3-rope >= 0.9.2
BuildArch:      noarch

%description
Eric is a Python and Ruby editor and IDE, written in Python. It is
based on the Qt GUI toolkit and integrates the Scintilla editor
control.

%package api
Summary:        API files for eric6
Group:          Development/Tools/IDE
Conflicts:      python-eric6-api

%description api
This package provides API files for eric6.
If both python-eric6 and python3-eric6 packages are installed then only one
python-eric6-api or python3-eric6-api is needed.

%prep
%setup -q -n %{eric}-%{version}

# Fix non-executable scripts:
sed -i "s|#!/usr/bin/env python3||" eric/{eric6_sqlbrowser,eric6_uipreviewer,Examples/rhallo,eric6_plugininstall,eric6_tray,eric6_pluginrepository,eric6_unittest,eric6_api,eric6,compileUiFiles,eric6_editor,eric6_trpreviewer,eric6_diff,install-i18n,uninstall,eric6_re,install,eric6_webbrowser,eric6_configure,eric6_iconeditor,Examples/hallo,eric6_qregexp,eric6_pluginuninstall,Utilities/crypto/py3AES,eric6_compare,eric6_doc,cleanupSource,eric6_snap,eric6_qregularexpression,Plugins/CheckerPlugins/CodeStyleChecker/pycodestyle}.py

%build
# nothing here

%install
python3 install.py -b %{_bindir} -d %{python3_sitelib} -i %{buildroot} -x --pyqt=5
%fdupes %{buildroot}/%{python3_sitelib}/%{eric}
# fix rpmlint warning
chmod +x %{buildroot}/%{python3_sitelib}/%{eric}/Utilities/crypto/py3AES.py

%files
%doc LICENSE.GPL3 README.rst THANKS
%{_bindir}/*
%{_datadir}/metainfo
%{_datadir}/metainfo/%{eric}.appdata.xml
%{_datadir}/applications/%{eric}.desktop
%{_datadir}/applications/%{eric}_browser.desktop
%{_datadir}/applications/%{eric}_webbrowser.desktop
%{_datadir}/pixmaps/eric.png
%{_datadir}/pixmaps/ericWeb.png
%{python3_sitelib}/*

%files api
%{_datadir}/qt5
%{_datadir}/qt5/qsci/api/python
%{_datadir}/qt5/qsci/api/python/*
%{_datadir}/qt5/qsci/api/ruby
%{_datadir}/qt5/qsci/api/ruby/*
%{_datadir}/qt5/qsci/api/qss
%{_datadir}/qt5/qsci/api/qss/*

%changelog
openSUSE Build Service is sponsored by