File mu-editor.spec of Package mu-editor
#
# spec file for package mu-editor
#
# 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/
#
Name: mu-editor
Version: 1.0.3
Release: 0
Summary: A simple Python editor for beginner programmers
License: GPL-3.0
# FIXME: use correct group, see "https://en.opensuse.org/openSUSE:Package_group_guidelines"
Group: Development/Languages/Python
URL: https://github.com/mu-editor/mu
Source0: https://github.com/mu-editor/mu/archive/v1.0.3.tar.gz#/mu-%{version}.tar.gz
BuildArch: noarch
BuildRequires: update-desktop-files
BuildRequires: fdupes
BuildRequires: python3-appdirs
BuildRequires: python3-beautifulsoup4
BuildRequires: python3-coverage
# BuildRequires: python3-gpiozero
# BuildRequires: python3-guizero
BuildRequires: python3-matplotlib
# BuildRequires: python3-nudatus
BuildRequires: python3-qscintilla-qt5
# BuildRequires: python3-qtconsole
# BuildRequires: python3-pgzero
# BuildRequires: python3-pigpio
BuildRequires: python3-Pillow
BuildRequires: python3-pycodestyle
BuildRequires: python3-pyflakes
# BuildRequires: python3-pynsist
# BuildRequires: python3-pyqt5
#oder
# BuildRequires: python3-qtpy
#
BuildRequires: python3-qt5-devel
# BuildRequires: python3-PyQtChart
BuildRequires: python3-pyserial
BuildRequires: python3-pytest
BuildRequires: python3-pytest-cov
# BuildRequires: python3-pytest-random-order
BuildRequires: python3-requests
BuildRequires: python3-semver
# BuildRequires: python3-scrapy
BuildRequires: python3-setuptools
BuildRequires: python3-Sphinx
BuildRequires: python3-twine
BuildRequires: python3-wheel
Requires: python3-pycodestyle >= 2.4.0
Requires: python3-pyflakes >= 2.0.0
Requires: python3-pyserial >= 3.4
# Requires: python3-pyqt5 >= 5.11.2
# Requires: python3-qscintilla >= 2.10.7
Requires: python3-jupyter_qtconsole >= 4.3.1
Requires: python3-qtconsole >= 4.3.1
Requires: python3-matplotlib >= 2.2.2
Requires: python3-pgzero >= 1.2
Requires: python3-PyQtChart >= 5.11.2
Requires: python3-appdirs >= 1.4.3
Requires: python3-gpiozero >= 1.4.1
Requires: python3-guizero >= 0.5.2
Requires: python3-pigpio >= 1.40.post1
Requires: python3-Pillow >= 5.2.0
Requires: python3-requests >= 2.19.1
Requires: python3-semver >= 2.8.0
%description
Mu is a simple code editor for beginner programmers based on extensive feedback
from teachers and learners. Having said that, Mu is for anyone who wants to use
a simple "no frills" editor.
Mu is a modal editor with modes for Adafruit's CircuitPython, the micro:bit's
version of MicroPython, PyGame Zero and standard Python 3 (including a
graphical debugger). Some of the modes make available a REPL (either
running on the connected CircuitPython or MicroPython device or as a Jupyter
based iPython session in Python3 mode).
%prep
%setup -q -n mu-%{version}
sed -i 's|Exec=mu|Exec=mu-editor|' conf/mu.codewith.editor.desktop
sed -i 's|#!/usr/bin/env python3|#!/usr/bin/python3|' mu/mu-debug.py
sed -i 's|qtconsole==4.3.1|qtconsole>=4.3.1|' setup.py
sed -i 's|qscintilla==2.11.4|qscintilla>=2.11.4|' setup.py
%build
python3 setup.py build
%install
python3 setup.py install --single-version-externally-managed -O1 --root=%{buildroot} --record=INSTALLED_FILES
chmod +x %{buildroot}%{python3_sitelib}/mu/mu-debug.py
mkdir -p %{buildroot}%{_datadir}/pixmaps
install -p -m 0644 conf/mu.codewith.editor.png %{buildroot}%{_datadir}/pixmaps/
%suse_update_desktop_file -i mu.codewith.editor Development IDE
%find_lang mu
%fdupes %{buildroot}%{python3_sitelib}
%files -f INSTALLED_FILES -f mu.lang
%doc README.rst
%license LICENSE
%{_bindir}/mu-editor
%{python3_sitelib}
%{_datadir}/applications/mu.codewith.editor.desktop
%{_datadir}/pixmaps/mu.codewith.editor.png
%changelog