17ed804
%bcond_with tests_py
17ed804
c90ea7d
%global srcurl  https://github.com/andreikop/%{name}
c90ea7d
ce8124c
Name:           enki
c5ae9bc
Version:        22.08.0
ec5788c
Release:        6%{?dist}
ce8124c
Summary:        Text editor for programmers
ce8124c
ce8124c
License:        GPLv2+
ce8124c
URL:            http://%{name}-editor.org/
ce8124c
c90ea7d
Source0:        %{srcurl}/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
ce8124c
ce8124c
BuildArch:      noarch
667c715
ExclusiveArch: %{qt5_qtwebengine_arches} noarch
ce8124c
7fa1b0d
BuildRequires:  python3-devel
7fa1b0d
BuildRequires:  python3-setuptools
ce8124c
4ccdb70
BuildRequires:  python3-qt5
4ccdb70
BuildRequires:  python3-pyparsing
4ccdb70
BuildRequires:  python3-qutepart
4ccdb70
ce8124c
# documentation
7fa1b0d
BuildRequires:  python3-sphinx
ce8124c
4ccdb70
# tests
ce8124c
BuildRequires:  desktop-file-utils
17ed804
%if %{with tests_py}
17ed804
#BuildRequires:  python3-sip
17ed804
BuildRequires:  python3-qt5-webengine
4ccdb70
BuildRequires:  xorg-x11-server-Xvfb
17ed804
%endif
4ccdb70
4ccdb70
# FIXME add more optional dependencies to enable specific tests
7fa1b0d
BuildRequires:  python3-markdown
7fa1b0d
BuildRequires:  python3-mock
7fa1b0d
BuildRequires:  python3-regex
ce8124c
ce8124c
# runtime
b1d28a9
Requires:       python3
4ccdb70
7fa1b0d
Requires:       python3-qt5
4ccdb70
Requires:       python3-pyparsing
56d64b3
# enforce fix for python 3.10
56d64b3
Requires:       python3-qutepart >= 3.3.2
ca1e7e4
# FIXME is sphinx optional?
ca1e7e4
Requires:       python3-sphinx
Raphael Groner 97c3cfe
17ed804
# FIXME issue#425, markdown is needed as dependency
db2b8a4
Requires:       python3-markdown
17ed804
56d64b3
%if 0%{?fedora}
56d64b3
22b7ee2
# optional for special runtime
49fa0d8
Recommends:     python3-flake8
22b7ee2
Recommends:     python3-docutils
db2b8a4
#Recommends:     python3-markdown
22b7ee2
Recommends:     python3-regex
22b7ee2
Recommends:     ctags
ffe8caf
# FIXME do we need QtWebEngine for sure?
17ed804
# upstream issues/446, rhbz#1642060
ffe8caf
Recommends:     python3-qt5-webengine
ffe8caf
17ed804
# upstream issues/465
17ed804
Suggests:       python3-qtconsole
Raphael Groner 97c3cfe
56d64b3
%endif # fedora
56d64b3
ce8124c
# we place additional icons
ce8124c
Requires:       hicolor-icon-theme
ce8124c
0a2e00d
# compatibility, accidently used subpackage, rhbz#1292724
17ed804
Obsoletes:      %{name}-plugins < 19.10.0
ce8124c
ce8124c
%description
ce8124c
Enki is a text editor for programmers. It is:
ce8124c
ce8124c
    - User friendly. Intuitive interface. Works out of the box. You don’t have
ce8124c
      to read a lot of docs.
ce8124c
    - Hacker friendly. Work as quickly as possible. Navigate efficiently without
ce8124c
      your mouse.
ce8124c
    - Advanced. You invent software. An editor helps you focus on inventing,
ce8124c
      instead of fighting with your tools.
ce8124c
    - Extensible. Operating systems are designed for running applications. Enki
ce8124c
      is designed for running plugins.
ce8124c
    - Cross platform. Use your habitual editor on any OS. Tested on Linux and
ce8124c
      Windows. Users report that Enki works Mac OS X.
ce8124c
    - High quality. No long list of fancy features. But, what is done, is done
ce8124c
      well.
ce8124c
    - Open source. Created, tested, and designed for the community, by the
ce8124c
      community, and with the community.
ce8124c
ce8124c
%package doc
ce8124c
Summary:        Additional documentation for %{name}
ce8124c
ce8124c
%description doc
ce8124c
%{summary}.
ce8124c
ce8124c
ce8124c
%prep
Raphael Groner 83124b5
%autosetup -p1 -n%{name}-%{version}
6515edb
# distutils does not know options entry_points and install_requires: use setuptools instead
6515edb
sed -i s:distutils\.core:setuptools: setup.py
49fa0d8
# skip enforcement of optional dependencies
af8930a
sed -i -r -e '/flake8/d' -e '/CodeChat/d' -e '/regex/d' setup.py
ce8124c
# ignore useless distribution folders
6515edb
rm -rv debian rpm win
b1d28a9
# skip tests of plugins, too hungry for poor Xvfb
6515edb
rm -v tests/test_plugins/*.py
ce8124c
ce8124c
%build
7fa1b0d
%py3_build
7fa1b0d
sphinx-build-3 doc html
6515edb
rm -rv html/.buildinfo html/.doctrees
7fa1b0d
ce8124c
%install
7fa1b0d
%py3_install
ce8124c
ce8124c
%check
ce8124c
desktop-file-validate %{buildroot}%{_datadir}/applications/%{name}.desktop
17ed804
17ed804
# FIXME rhbz#1752766, python3-sip not available
17ed804
%if %{with tests_py}
b1d28a9
# we must be inside the tests folder to let the script find something
b1d28a9
pushd tests
ffe8caf
# FIXME ugly hackery to disable failing tests
ffe8caf
# https://github.com/andreikop/enki/issues/456
ffe8caf
sed -i "s:'TRAVIS_OS_NAME' in os.environ:True:" test_base.py
b1d28a9
# run tests in a mocked X environment
6515edb
xvfb-run -s '-screen :0 1024x768x16' %{__python3} run_all.py
17ed804
%endif
ce8124c
ce8124c
ce8124c
%files
ce8124c
%license LICENSE.GPL2
ce8124c
%doc README.md ChangeLog
7fa1b0d
%{python3_sitelib}/%{name}*.egg-info
b1d28a9
%{python3_sitelib}/%{name}/
ce8124c
%{_datadir}/icons/hicolor/*/apps/%{name}.*
ce8124c
%{_datadir}/pixmaps/%{name}.png
ce8124c
%{_datadir}/applications/%{name}.desktop
ce8124c
%{_bindir}/%{name}
ce8124c
ce8124c
%files doc
ce8124c
%license LICENSE.GPL2
ce8124c
%doc html/
ce8124c
ce8124c
%changelog
ec5788c
* Wed Jan 24 2024 Fedora Release Engineering <releng@fedoraproject.org> - 22.08.0-6
ec5788c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
ec5788c
509a9c6
* Fri Jan 19 2024 Fedora Release Engineering <releng@fedoraproject.org> - 22.08.0-5
509a9c6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
509a9c6
338adaf
* Wed Jul 19 2023 Fedora Release Engineering <releng@fedoraproject.org> - 22.08.0-4
338adaf
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
338adaf
d9e2a5a
* Tue Jul 11 2023 Python Maint <python-maint@redhat.com> - 22.08.0-3
d9e2a5a
- Rebuilt for Python 3.12
d9e2a5a
688b59b
* Thu Jan 19 2023 Fedora Release Engineering <releng@fedoraproject.org> - 22.08.0-2
688b59b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
688b59b
c5ae9bc
* Wed Aug 10 2022 Fedora Release Monitoring <release-monitoring@fedoraproject.org> - 22.08.0-1
c5ae9bc
- Update to 22.08.0 (#2117246)
c5ae9bc
aeeb337
* Thu Jul 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 21.11.0-5
aeeb337
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
aeeb337
17bb41d
* Tue Jul 19 2022 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 21.11.0-4
17bb41d
- Rebuilt for pyparsing-3.0.9
17bb41d
1a7d9e4
* Mon Jun 13 2022 Python Maint <python-maint@redhat.com> - 21.11.0-3
1a7d9e4
- Rebuilt for Python 3.11
1a7d9e4
705cf49
* Thu Jan 20 2022 Fedora Release Engineering <releng@fedoraproject.org> - 21.11.0-2
705cf49
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
705cf49
56d64b3
* Sun Nov 21 2021 Raphael Groner <raphgro@fedoraproject.org> - 21.11.0-1
56d64b3
- new version, rhbz#2023192
56d64b3
- fix crash with python 3.10, rhbz#2019640
56d64b3
- ignore weak dependencies for builds without fedora
56d64b3
95182b2
* Wed Jul 21 2021 Fedora Release Engineering <releng@fedoraproject.org> - 20.03.1-6
95182b2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
95182b2
db3b1f8
* Fri Jun 04 2021 Python Maint <python-maint@redhat.com> - 20.03.1-5
db3b1f8
- Rebuilt for Python 3.10
db3b1f8
352f57f
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 20.03.1-4
352f57f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
352f57f
8498e22
* Mon Jul 27 2020 Fedora Release Engineering <releng@fedoraproject.org> - 20.03.1-3
8498e22
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
8498e22
c18fb16
* Tue May 26 2020 Miro Hrončok <mhroncok@redhat.com> - 20.03.1-2
c18fb16
- Rebuilt for Python 3.9
c18fb16
38ae075
* Thu Apr 02 2020 Raphael Groner <projects.rg@smart.ms> - 20.03.1-1
38ae075
- new version
38ae075
c4759ca
* Tue Jan 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 19.10.0-3
c4759ca
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
c4759ca
52b7b54
* Sat Nov 23 2019 Raphael Groner <projects.rg@smart.ms> - 19.10.0-2
52b7b54
- rebuilt (python-qutepart)
52b7b54
17ed804
* Sat Nov 23 2019 Raphael Groner <projects.rg@smart.ms> - 19.10.0-1
17ed804
- new version
17ed804
9a6e31f
* Thu Oct 03 2019 Miro Hrončok <mhroncok@redhat.com> - 18.08.0-6
9a6e31f
- Rebuilt for Python 3.8.0rc1 (#1748018)
9a6e31f
255152e
* Mon Aug 19 2019 Miro Hrončok <mhroncok@redhat.com> - 18.08.0-5
255152e
- Rebuilt for Python 3.8
255152e
667c715
* Wed Aug 07 2019 Dan Horák <dan[at]danny.cz> - 18.08.0-4
667c715
- set ExclusiveArch as there is dependency on qt5-qtwebengine
667c715
65d16d5
* Wed Jul 24 2019 Fedora Release Engineering <releng@fedoraproject.org> - 18.08.0-3
65d16d5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
65d16d5
702280d
* Thu Jan 31 2019 Fedora Release Engineering <releng@fedoraproject.org> - 18.08.0-2
702280d
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
702280d
ffe8caf
* Mon Dec 17 2018 Raphael Groner <projects.rg@smart.ms> - 18.08.0-1
ffe8caf
- new version
ffe8caf
db2b8a4
* Sun Jul 22 2018 Raphael Groner <projects.rg@smart.ms> - 17.03.0-10
db2b8a4
- mark markdown as mandatory to fix an issue with setup.py
db2b8a4
5702a4c
* Thu Jul 12 2018 Fedora Release Engineering <releng@fedoraproject.org> - 17.03.0-9
5702a4c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
5702a4c
10faf08
* Tue Jun 19 2018 Miro Hrončok <mhroncok@redhat.com> - 17.03.0-8
10faf08
- Rebuilt for Python 3.7
10faf08
36de7e9
* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 17.03.0-7
36de7e9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
36de7e9
ca1e7e4
* Sun Aug 13 2017 Raphael Groner <projects.rg@smart.ms> - 17.03.0-6
ca1e7e4
- add dependency python3-sphinx
ca1e7e4
5fa0d26
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 17.03.0-5
5fa0d26
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
5fa0d26
af8930a
* Sun May 07 2017 Raphael Groner <projects.rg@smart.ms> - 17.03.0-4
af8930a
- thread regex as optional, too
af8930a
49fa0d8
* Sun May 07 2017 Raphael Groner <projects.rg@smart.ms> - 17.03.0-3
49fa0d8
- drop hard dependencies to flake8 and CodeChat, latter not packaged yet
49fa0d8
22b7ee2
* Tue Mar 28 2017 Raphael Groner <projects.rg@smart.ms> - 17.03.0-2
22b7ee2
- mark optional dependencies
22b7ee2
6515edb
* Tue Mar 28 2017 Raphael Groner <projects.rg@smart.ms> - 17.03.0-1
6515edb
- Update to 17.03.0 (#1436456)
6515edb
- use setuptools instead of distutils
6515edb
- explicitly set screen depth for tests: qt dropped support for depth 8
6515edb
- add verbose option to rm
6515edb
8e2b906
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 16.04.1-6
8e2b906
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
8e2b906
1638e25
* Mon Dec 19 2016 Miro Hrončok <mhroncok@redhat.com> - 16.04.1-5
1638e25
- Rebuild for Python 3.6
1638e25
6fec1e7
* Thu Dec 08 2016 Builder <projects.rg@smart.ms> - 16.04.1-4
6fec1e7
- rebuilt for Qt 5.7.1
6fec1e7
7a7465b
* Tue Aug 30 2016 Raphael Groner <projects.rg@smart.ms> - 16.04.1-3
4ccdb70
- rhbz#1365138, add python3-pyparsing and drop python2 relations
4ccdb70
- reorder dependency list for better overview
4ccdb70
032eb48
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 16.04.1-2
032eb48
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
032eb48
Raphael Groner a19a126
* Wed Jun 15 2016 Raphael Groner <projects.rg@smart.ms> - 16.04.1-1
Raphael Groner a19a126
- new version
Raphael Groner a19a126
- drop upstreamed patch
Raphael Groner a19a126
Raphael Groner 83124b5
* Mon May 09 2016 Raphael Groner <projects.rg@smart.ms> - 16.04.0-3
Raphael Groner 83124b5
- fix TypeError: decorated slot, rhbz#1332274
Raphael Groner 83124b5
Raphael Groner 97c3cfe
* Sun Apr 24 2016 Raphael Groner <projects.rg@smart.ms> - 16.04.0-2
Raphael Groner 97c3cfe
- add R: python3-qt5-webkit, enki does not work without
Raphael Groner 97c3cfe
c607c8c
* Fri Apr 22 2016 Raphael Groner <projects.rg@smart.ms> - 16.04.0-1
f9fca84
- bump to v16.04.0
c607c8c
b1d28a9
* Thu Mar 24 2016 Raphael Groner <projects.rg@smart.ms> - 15.11.2-0.3.20160227git8e374ef
b1d28a9
- remove obsolete workarounds
b1d28a9
Rex Dieter 3d732a1
* Wed Mar 02 2016 Rex Dieter <rdieter@fedoraproject.org> 15.11.2-0.2
Rex Dieter 3d732a1
- Requires: python3-qt5-webkit
Rex Dieter 3d732a1
7fa1b0d
* Sun Feb 28 2016 Raphael Groner <projects.rg@smart.ms> - 15.11.2-0.1
7fa1b0d
- v15.11.2, maybe 15.12.0 or similiar, but pre1
7fa1b0d
- move to python3 and qt5
7fa1b0d
4a463e1
* Sat Feb 27 2016 Raphael Groner <projects.rg@smart.ms> - 15.11.1-3
4a463e1
- rebuild to validate dependencies (crash in koschei)
4a463e1
9a1b089
* Wed Feb 03 2016 Fedora Release Engineering <releng@fedoraproject.org> - 15.11.1-2
9a1b089
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
9a1b089
7c58712
* Mon Jan 11 2016 Fedora Release Monitoring <release-monitoring@fedoraproject.org> - 15.11.1-1
7c58712
- Update to 15.11.1 (#1297567)
7c58712
0a2e00d
* Sat Jan 09 2016 Raphael Groner <projects.rg@smart.ms> - 15.11.0-2
0a2e00d
- merge plugins subpackage, rhbz#1292724
0a2e00d
ce8124c
* Thu Dec 03 2015 Raphael Groner <projects.rg@smart.ms> - 15.11.0-1
ce8124c
- new version
ce8124c
- add python-regex
ce8124c
- remove license breakdown, now generally GPLv2+
ce8124c
- remove Suggests: enki-plugins
ce8124c
ce8124c
* Tue Nov 17 2015 Raphael Groner <projects.rg@smart.ms> - 15.05.0-2
ce8124c
- fix license breakdown
ce8124c
- ignore useless distribution folders
ce8124c
- use python macros to build and install
ce8124c
- split plugins into subpackage
ce8124c
ce8124c
* Fri Nov 13 2015 Raphael Groner <projects.rg@smart.ms> - 15.05.0-1
ce8124c
- continue review
ce8124c
- new upstream version
ce8124c
- add proper snippets for mime database and icon cache
ce8124c
- generate documentation
ce8124c
- execute tests
ce8124c
ce8124c
* Thu May 7 2015 Jairo Llopis <yajo.sk8@gmail.com> 14.07.2-7
ce8124c
- New upstream version.
ce8124c
- Updated dependencies.
ce8124c
- Updated description.
ce8124c
- Remove translations.
ce8124c
ce8124c
* Mon Jul 7 2014 Jairo Llopis <yajo.sk8@gmail.com> 14.03.0-6
ce8124c
- New upstream version.
ce8124c
- Fix some macros in the spec file.
ce8124c
ce8124c
* Sun Oct 6 2013 Jairo Llopis <yajo.sk8@gmail.com> 13.09.2-5
ce8124c
- Add dependency to python-docutils.
ce8124c
ce8124c
* Sun Oct 6 2013 Jairo Llopis <yajo.sk8@gmail.com> 13.09.2-4
ce8124c
- New upstream version.
ce8124c
ce8124c
* Sun Sep 8 2013 Jairo Llopis <yajo.sk8@gmail.com> 13.08.1-3
ce8124c
- New upstream version, now based on qutepart.
ce8124c
- Remove patch that has already been merged upstream.
ce8124c
ce8124c
* Tue Jul 16 2013 Jairo Llopis <yajo.sk8@gmail.com> 12.10.3-2
ce8124c
- Declare variables with global.
ce8124c
- Link patch0 to its upstream bug.
ce8124c
- Validate desktop file installation.
ce8124c
- Add icon cache scriptlets.
ce8124c
- Change Source tag for Source0.
ce8124c
- Fix requirements.
ce8124c
ce8124c
* Sat Jul 6 2013 Jairo Llopis <yajo.sk8@gmail.com> 12.10.3-1
ce8124c
- Initial release.