python-pygments/python-pygments.spec

98 lines
2.5 KiB
RPMSpec
Raw Normal View History

2019-12-14 21:12:48 +08:00
%global _description \
Pygments is a generic syntax highlighter suitable for use \
in code hosting, forums, wikis or other applications that \
need to prettify source code. Highlights are: \
* a wide range of over 500 languages and other text \
formats is supported \
* special attention is paid to details that increase \
highlighting quality \
* support for new languages and formats are added easily; \
most languages use a simple regex-based lexing mechanism \
* a number of output formats is available, among them HTML, \
RTF, LaTeX and ANSI sequences \
* it is usable as a command-line tool and as a library \
* and it highlights even Perl 6!
2022-02-03 22:50:55 +08:00
%bcond_with docs
2021-12-20 17:20:27 +08:00
%bcond_without tests
2019-12-14 21:12:48 +08:00
Name: python-pygments
Summary: Syntax highlighting engine written in Python
2021-12-20 17:20:27 +08:00
Version: 2.10.0
2022-02-03 22:50:55 +08:00
Release: 2
2019-12-14 21:12:48 +08:00
License: BSD
URL: http://pygments.org/
Source0: https://pypi.org/packages/source/P/Pygments/Pygments-%{version}.tar.gz
BuildArch: noarch
%description
%{_description}
%package -n python3-pygments
2020-07-28 17:48:52 +08:00
BuildRequires: python3-devel, python3-setuptools
%if %{with tests}
BuildRequires: python3-pytest
%endif
%if %{with docs}
2021-12-20 17:20:27 +08:00
BuildRequires: python3-sphinx python3-pip
2020-07-28 17:48:52 +08:00
%endif
2019-12-14 21:12:48 +08:00
Summary: Syntax highlighting engine written in Python
%{?python_provide:%python_provide python3-pygments}
%description -n python3-pygments
%{_description}
%package_help
%prep
%autosetup -p1 -n Pygments-%{version}
%build
%{__sed} -i 's/\r//' LICENSE
%py3_build
%install
%py3_install
2020-07-28 17:48:52 +08:00
%if %{with docs}
%{__python3} setup.py build_sphinx
rm -rf build/sphinx/html/.buildinfo
install doc/pygmentize.1 -Dt %{buildroot}%{_mandir}/man1/
chmod -x %{buildroot}%{_mandir}/man1/*.1
%endif
cp -r doc/docs doc/reST
%if %{with tests}
2019-12-14 21:12:48 +08:00
%check
2021-12-20 17:20:27 +08:00
make test
2020-07-28 17:48:52 +08:00
%endif
2019-12-14 21:12:48 +08:00
%files -n python3-pygments
%license LICENSE
%{python3_sitelib}/*
%{_bindir}/pygmentize
%files help
2020-07-28 17:48:52 +08:00
%doc AUTHORS CHANGES doc/reST
%if %{with docs}
2019-12-14 21:12:48 +08:00
%lang(en) %{_mandir}/man1/pygmentize.1*
2020-07-28 17:48:52 +08:00
%doc build/sphinx/html
%endif
2019-12-14 21:12:48 +08:00
%changelog
2022-02-03 22:50:55 +08:00
* Thu Feb 03 2022 Liu Zixian <liuzixian4@huawei.com> -2.10.0-2
- Disable doc temporarily to break build dependency.
2021-12-20 17:20:27 +08:00
* Mon Dec 20 2021 renhongxun <renhongxun@huawei.com> - 2.10.0-1
- Upgrade version to 2.10.0
2021-08-11 23:46:46 +08:00
* Fri Aug 06 2021 OpenStack_SIG <openstack@openeuler.org> - 2.8.1-1
- Update version to 2.8.1
2021-02-02 11:11:10 +08:00
* Wed Jan 13 2021 SimpleUpdate Robot <tc@openeuler.org> - 2.7.4-1
- Upgrade to version 2.7.4
2020-07-28 17:48:52 +08:00
* Tue Jul 28 2020 jinzhimin<jinzhimin2@huawei.com> - 2.6.1-1
- update to 2.6.1-1
2019-12-14 21:12:48 +08:00
* Fri Dec 6 2019 caomeng<caomeng5@huawei.com> - 2.2.0-15
2020-07-28 17:48:52 +08:00
- Package init