17ed80
%bcond_with tests_py
17ed80
c90ea7
%global srcurl  https://github.com/andreikop/%{name}
c90ea7
ce8124
Name:           enki
38ae07
Version:        20.03.1
38ae07
Release:        1%{?dist}
ce8124
Summary:        Text editor for programmers
ce8124
ce8124
License:        GPLv2+
ce8124
URL:            http://%{name}-editor.org/
ce8124
c90ea7
Source0:        %{srcurl}/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
ce8124
ce8124
BuildArch:      noarch
667c71
ExclusiveArch: %{qt5_qtwebengine_arches} noarch
ce8124
7fa1b0
BuildRequires:  python3-devel
7fa1b0
BuildRequires:  python3-setuptools
ce8124
4ccdb7
BuildRequires:  python3-qt5
4ccdb7
BuildRequires:  python3-pyparsing
4ccdb7
BuildRequires:  python3-qutepart
4ccdb7
ce8124
# documentation
7fa1b0
BuildRequires:  python3-sphinx
ce8124
4ccdb7
# tests
ce8124
BuildRequires:  desktop-file-utils
17ed80
%if %{with tests_py}
17ed80
#BuildRequires:  python3-sip
17ed80
BuildRequires:  python3-qt5-webengine
4ccdb7
BuildRequires:  xorg-x11-server-Xvfb
17ed80
%endif
4ccdb7
4ccdb7
# FIXME add more optional dependencies to enable specific tests
7fa1b0
BuildRequires:  python3-markdown
7fa1b0
BuildRequires:  python3-mock
7fa1b0
BuildRequires:  python3-regex
ce8124
ce8124
# runtime
b1d28a
Requires:       python3
4ccdb7
7fa1b0
Requires:       python3-qt5
4ccdb7
Requires:       python3-pyparsing
4ccdb7
Requires:       python3-qutepart
ca1e7e
# FIXME is sphinx optional?
ca1e7e
Requires:       python3-sphinx
Raphael Groner 97c3cf
17ed80
# FIXME issue#425, markdown is needed as dependency
db2b8a
Requires:       python3-markdown
17ed80
22b7ee
# optional for special runtime
49fa0d
Recommends:     python3-flake8
22b7ee
Recommends:     python3-docutils
db2b8a
#Recommends:     python3-markdown
22b7ee
Recommends:     python3-regex
22b7ee
Recommends:     ctags
ffe8ca
# FIXME do we need QtWebEngine for sure?
17ed80
# upstream issues/446, rhbz#1642060
ffe8ca
Recommends:     python3-qt5-webengine
ffe8ca
17ed80
# upstream issues/465
17ed80
Suggests:       python3-qtconsole
Raphael Groner 97c3cf
ce8124
# we place additional icons
ce8124
Requires:       hicolor-icon-theme
ce8124
0a2e00
# compatibility, accidently used subpackage, rhbz#1292724
17ed80
Obsoletes:      %{name}-plugins < 19.10.0
ce8124
ce8124
%description
ce8124
Enki is a text editor for programmers. It is:
ce8124
ce8124
    - User friendly. Intuitive interface. Works out of the box. You don’t have
ce8124
      to read a lot of docs.
ce8124
    - Hacker friendly. Work as quickly as possible. Navigate efficiently without
ce8124
      your mouse.
ce8124
    - Advanced. You invent software. An editor helps you focus on inventing,
ce8124
      instead of fighting with your tools.
ce8124
    - Extensible. Operating systems are designed for running applications. Enki
ce8124
      is designed for running plugins.
ce8124
    - Cross platform. Use your habitual editor on any OS. Tested on Linux and
ce8124
      Windows. Users report that Enki works Mac OS X.
ce8124
    - High quality. No long list of fancy features. But, what is done, is done
ce8124
      well.
ce8124
    - Open source. Created, tested, and designed for the community, by the
ce8124
      community, and with the community.
ce8124
ce8124
%package doc
ce8124
Summary:        Additional documentation for %{name}
ce8124
ce8124
%description doc
ce8124
%{summary}.
ce8124
ce8124
ce8124
%prep
Raphael Groner 83124b
%autosetup -p1 -n%{name}-%{version}
6515ed
# distutils does not know options entry_points and install_requires: use setuptools instead
6515ed
sed -i s:distutils\.core:setuptools: setup.py
49fa0d
# skip enforcement of optional dependencies
af8930
sed -i -r -e '/flake8/d' -e '/CodeChat/d' -e '/regex/d' setup.py
ce8124
# ignore useless distribution folders
6515ed
rm -rv debian rpm win
b1d28a
# skip tests of plugins, too hungry for poor Xvfb
6515ed
rm -v tests/test_plugins/*.py
ce8124
ce8124
%build
7fa1b0
%py3_build
7fa1b0
sphinx-build-3 doc html
6515ed
rm -rv html/.buildinfo html/.doctrees
7fa1b0
ce8124
%install
7fa1b0
%py3_install
ce8124
ce8124
%check
ce8124
desktop-file-validate %{buildroot}%{_datadir}/applications/%{name}.desktop
17ed80
17ed80
# FIXME rhbz#1752766, python3-sip not available
17ed80
%if %{with tests_py}
b1d28a
# we must be inside the tests folder to let the script find something
b1d28a
pushd tests
ffe8ca
# FIXME ugly hackery to disable failing tests
ffe8ca
# https://github.com/andreikop/enki/issues/456
ffe8ca
sed -i "s:'TRAVIS_OS_NAME' in os.environ:True:" test_base.py
b1d28a
# run tests in a mocked X environment
6515ed
xvfb-run -s '-screen :0 1024x768x16' %{__python3} run_all.py
17ed80
%endif
ce8124
ce8124
ce8124
%files
ce8124
%license LICENSE.GPL2
ce8124
%doc README.md ChangeLog
7fa1b0
%{python3_sitelib}/%{name}*.egg-info
b1d28a
%{python3_sitelib}/%{name}/
ce8124
%{_datadir}/icons/hicolor/*/apps/%{name}.*
ce8124
%{_datadir}/pixmaps/%{name}.png
ce8124
%{_datadir}/applications/%{name}.desktop
ce8124
%{_bindir}/%{name}
ce8124
ce8124
%files doc
ce8124
%license LICENSE.GPL2
ce8124
%doc html/
ce8124
ce8124
%changelog
38ae07
* Thu Apr 02 2020 Raphael Groner <projects.rg@smart.ms> - 20.03.1-1
38ae07
- new version
38ae07
c4759c
* Tue Jan 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 19.10.0-3
c4759c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
c4759c
52b7b5
* Sat Nov 23 2019 Raphael Groner <projects.rg@smart.ms> - 19.10.0-2
52b7b5
- rebuilt (python-qutepart)
52b7b5
17ed80
* Sat Nov 23 2019 Raphael Groner <projects.rg@smart.ms> - 19.10.0-1
17ed80
- new version
17ed80
9a6e31
* Thu Oct 03 2019 Miro Hrončok <mhroncok@redhat.com> - 18.08.0-6
9a6e31
- Rebuilt for Python 3.8.0rc1 (#1748018)
9a6e31
255152
* Mon Aug 19 2019 Miro Hrončok <mhroncok@redhat.com> - 18.08.0-5
255152
- Rebuilt for Python 3.8
255152
667c71
* Wed Aug 07 2019 Dan Horák <dan[at]danny.cz> - 18.08.0-4
667c71
- set ExclusiveArch as there is dependency on qt5-qtwebengine
667c71
65d16d
* Wed Jul 24 2019 Fedora Release Engineering <releng@fedoraproject.org> - 18.08.0-3
65d16d
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
65d16d
702280
* Thu Jan 31 2019 Fedora Release Engineering <releng@fedoraproject.org> - 18.08.0-2
702280
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
702280
ffe8ca
* Mon Dec 17 2018 Raphael Groner <projects.rg@smart.ms> - 18.08.0-1
ffe8ca
- new version
ffe8ca
db2b8a
* Sun Jul 22 2018 Raphael Groner <projects.rg@smart.ms> - 17.03.0-10
db2b8a
- mark markdown as mandatory to fix an issue with setup.py
db2b8a
5702a4
* Thu Jul 12 2018 Fedora Release Engineering <releng@fedoraproject.org> - 17.03.0-9
5702a4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
5702a4
10faf0
* Tue Jun 19 2018 Miro Hrončok <mhroncok@redhat.com> - 17.03.0-8
10faf0
- Rebuilt for Python 3.7
10faf0
36de7e
* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 17.03.0-7
36de7e
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
36de7e
ca1e7e
* Sun Aug 13 2017 Raphael Groner <projects.rg@smart.ms> - 17.03.0-6
ca1e7e
- add dependency python3-sphinx
ca1e7e
5fa0d2
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 17.03.0-5
5fa0d2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
5fa0d2
af8930
* Sun May 07 2017 Raphael Groner <projects.rg@smart.ms> - 17.03.0-4
af8930
- thread regex as optional, too
af8930
49fa0d
* Sun May 07 2017 Raphael Groner <projects.rg@smart.ms> - 17.03.0-3
49fa0d
- drop hard dependencies to flake8 and CodeChat, latter not packaged yet
49fa0d
22b7ee
* Tue Mar 28 2017 Raphael Groner <projects.rg@smart.ms> - 17.03.0-2
22b7ee
- mark optional dependencies
22b7ee
6515ed
* Tue Mar 28 2017 Raphael Groner <projects.rg@smart.ms> - 17.03.0-1
6515ed
- Update to 17.03.0 (#1436456)
6515ed
- use setuptools instead of distutils
6515ed
- explicitly set screen depth for tests: qt dropped support for depth 8
6515ed
- add verbose option to rm
6515ed
8e2b90
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 16.04.1-6
8e2b90
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
8e2b90
1638e2
* Mon Dec 19 2016 Miro Hrončok <mhroncok@redhat.com> - 16.04.1-5
1638e2
- Rebuild for Python 3.6
1638e2
6fec1e
* Thu Dec 08 2016 Builder <projects.rg@smart.ms> - 16.04.1-4
6fec1e
- rebuilt for Qt 5.7.1
6fec1e
7a7465
* Tue Aug 30 2016 Raphael Groner <projects.rg@smart.ms> - 16.04.1-3
4ccdb7
- rhbz#1365138, add python3-pyparsing and drop python2 relations
4ccdb7
- reorder dependency list for better overview
4ccdb7
032eb4
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 16.04.1-2
032eb4
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
032eb4
Raphael Groner a19a12
* Wed Jun 15 2016 Raphael Groner <projects.rg@smart.ms> - 16.04.1-1
Raphael Groner a19a12
- new version
Raphael Groner a19a12
- drop upstreamed patch
Raphael Groner a19a12
Raphael Groner 83124b
* Mon May 09 2016 Raphael Groner <projects.rg@smart.ms> - 16.04.0-3
Raphael Groner 83124b
- fix TypeError: decorated slot, rhbz#1332274
Raphael Groner 83124b
Raphael Groner 97c3cf
* Sun Apr 24 2016 Raphael Groner <projects.rg@smart.ms> - 16.04.0-2
Raphael Groner 97c3cf
- add R: python3-qt5-webkit, enki does not work without
Raphael Groner 97c3cf
c607c8
* Fri Apr 22 2016 Raphael Groner <projects.rg@smart.ms> - 16.04.0-1
f9fca8
- bump to v16.04.0
c607c8
b1d28a
* Thu Mar 24 2016 Raphael Groner <projects.rg@smart.ms> - 15.11.2-0.3.20160227git8e374ef
b1d28a
- remove obsolete workarounds
b1d28a
Rex Dieter 3d732a
* Wed Mar 02 2016 Rex Dieter <rdieter@fedoraproject.org> 15.11.2-0.2
Rex Dieter 3d732a
- Requires: python3-qt5-webkit
Rex Dieter 3d732a
7fa1b0
* Sun Feb 28 2016 Raphael Groner <projects.rg@smart.ms> - 15.11.2-0.1
7fa1b0
- v15.11.2, maybe 15.12.0 or similiar, but pre1
7fa1b0
- move to python3 and qt5
7fa1b0
4a463e
* Sat Feb 27 2016 Raphael Groner <projects.rg@smart.ms> - 15.11.1-3
4a463e
- rebuild to validate dependencies (crash in koschei)
4a463e
9a1b08
* Wed Feb 03 2016 Fedora Release Engineering <releng@fedoraproject.org> - 15.11.1-2
9a1b08
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
9a1b08
7c5871
* Mon Jan 11 2016 Fedora Release Monitoring <release-monitoring@fedoraproject.org> - 15.11.1-1
7c5871
- Update to 15.11.1 (#1297567)
7c5871
0a2e00
* Sat Jan 09 2016 Raphael Groner <projects.rg@smart.ms> - 15.11.0-2
0a2e00
- merge plugins subpackage, rhbz#1292724
0a2e00
ce8124
* Thu Dec 03 2015 Raphael Groner <projects.rg@smart.ms> - 15.11.0-1
ce8124
- new version
ce8124
- add python-regex
ce8124
- remove license breakdown, now generally GPLv2+
ce8124
- remove Suggests: enki-plugins
ce8124
ce8124
* Tue Nov 17 2015 Raphael Groner <projects.rg@smart.ms> - 15.05.0-2
ce8124
- fix license breakdown
ce8124
- ignore useless distribution folders
ce8124
- use python macros to build and install
ce8124
- split plugins into subpackage
ce8124
ce8124
* Fri Nov 13 2015 Raphael Groner <projects.rg@smart.ms> - 15.05.0-1
ce8124
- continue review
ce8124
- new upstream version
ce8124
- add proper snippets for mime database and icon cache
ce8124
- generate documentation
ce8124
- execute tests
ce8124
ce8124
* Thu May 7 2015 Jairo Llopis <yajo.sk8@gmail.com> 14.07.2-7
ce8124
- New upstream version.
ce8124
- Updated dependencies.
ce8124
- Updated description.
ce8124
- Remove translations.
ce8124
ce8124
* Mon Jul 7 2014 Jairo Llopis <yajo.sk8@gmail.com> 14.03.0-6
ce8124
- New upstream version.
ce8124
- Fix some macros in the spec file.
ce8124
ce8124
* Sun Oct 6 2013 Jairo Llopis <yajo.sk8@gmail.com> 13.09.2-5
ce8124
- Add dependency to python-docutils.
ce8124
ce8124
* Sun Oct 6 2013 Jairo Llopis <yajo.sk8@gmail.com> 13.09.2-4
ce8124
- New upstream version.
ce8124
ce8124
* Sun Sep 8 2013 Jairo Llopis <yajo.sk8@gmail.com> 13.08.1-3
ce8124
- New upstream version, now based on qutepart.
ce8124
- Remove patch that has already been merged upstream.
ce8124
ce8124
* Tue Jul 16 2013 Jairo Llopis <yajo.sk8@gmail.com> 12.10.3-2
ce8124
- Declare variables with global.
ce8124
- Link patch0 to its upstream bug.
ce8124
- Validate desktop file installation.
ce8124
- Add icon cache scriptlets.
ce8124
- Change Source tag for Source0.
ce8124
- Fix requirements.
ce8124
ce8124
* Sat Jul 6 2013 Jairo Llopis <yajo.sk8@gmail.com> 12.10.3-1
ce8124
- Initial release.