Packaging improvements...
- provide pygmentize - update description to match upstream - use %{summary} in the subpackage Summary - drop %{?python_provide:...} - move BRs before the subpackage - do not package sources of documentation - it is no longer needed to fix LICENSE end-of-lines
This commit is contained in:
parent
a9b56752f8
commit
6ec5db69a7
@ -13,24 +13,6 @@ Source0: %{pypi_source Pygments}
|
|||||||
|
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
|
|
||||||
%global _description %{expand:
|
|
||||||
Pygments is a generic syntax highlighter for general use in all kinds
|
|
||||||
of software such as forum systems, wikis or other applications that
|
|
||||||
need to prettify source code. Highlights are:
|
|
||||||
|
|
||||||
* a wide range of common languages and markup 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 Brainf*ck!}
|
|
||||||
|
|
||||||
%description %_description
|
|
||||||
|
|
||||||
%package -n python%{python3_pkgversion}-pygments
|
|
||||||
BuildRequires: python%{python3_pkgversion}-devel
|
BuildRequires: python%{python3_pkgversion}-devel
|
||||||
BuildRequires: pyproject-rpm-macros
|
BuildRequires: pyproject-rpm-macros
|
||||||
%if %{with tests}
|
%if %{with tests}
|
||||||
@ -40,21 +22,43 @@ BuildRequires: python%{python3_pkgversion}-pytest
|
|||||||
%if %{with docs}
|
%if %{with docs}
|
||||||
BuildRequires: python%{python3_pkgversion}-sphinx
|
BuildRequires: python%{python3_pkgversion}-sphinx
|
||||||
%endif
|
%endif
|
||||||
Summary: Syntax highlighting engine written in Python
|
|
||||||
%{?python_provide:%python_provide python%{python3_pkgversion}-pygments}
|
%global _description %{expand:
|
||||||
|
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}
|
||||||
|
|
||||||
|
%description %_description
|
||||||
|
|
||||||
|
|
||||||
|
%package -n python%{python3_pkgversion}-pygments
|
||||||
|
Summary: %{summary}
|
||||||
|
Provides: pygmentize = %{?epoch:%{epoch}:}%{version}-%{release}
|
||||||
|
|
||||||
%description -n python%{python3_pkgversion}-pygments %_description
|
%description -n python%{python3_pkgversion}-pygments %_description
|
||||||
|
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%autosetup -p1 -n Pygments-%{version}
|
%autosetup -p1 -n Pygments-%{version}
|
||||||
|
|
||||||
|
|
||||||
%generate_buildrequires
|
%generate_buildrequires
|
||||||
%pyproject_buildrequires
|
%pyproject_buildrequires
|
||||||
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
sed -i 's/\r//' LICENSE
|
|
||||||
%pyproject_wheel
|
%pyproject_wheel
|
||||||
|
|
||||||
|
|
||||||
%install
|
%install
|
||||||
%pyproject_install
|
%pyproject_install
|
||||||
%pyproject_save_files pygments
|
%pyproject_save_files pygments
|
||||||
@ -65,7 +69,6 @@ rm -rf build/sphinx/html/.buildinfo
|
|||||||
install doc/pygmentize.1 -Dt %{buildroot}%{_mandir}/man1/
|
install doc/pygmentize.1 -Dt %{buildroot}%{_mandir}/man1/
|
||||||
chmod -x %{buildroot}%{_mandir}/man1/*.1
|
chmod -x %{buildroot}%{_mandir}/man1/*.1
|
||||||
%endif
|
%endif
|
||||||
cp -r doc/docs doc/reST
|
|
||||||
|
|
||||||
|
|
||||||
%if %{with tests}
|
%if %{with tests}
|
||||||
@ -75,7 +78,7 @@ make test PYTHON=%{python3}
|
|||||||
|
|
||||||
|
|
||||||
%files -n python%{python3_pkgversion}-pygments -f %{pyproject_files}
|
%files -n python%{python3_pkgversion}-pygments -f %{pyproject_files}
|
||||||
%doc AUTHORS CHANGES doc/reST
|
%doc AUTHORS CHANGES
|
||||||
%license LICENSE
|
%license LICENSE
|
||||||
%{_bindir}/pygmentize
|
%{_bindir}/pygmentize
|
||||||
%if %{with docs}
|
%if %{with docs}
|
||||||
@ -83,6 +86,7 @@ make test PYTHON=%{python3}
|
|||||||
%doc build/sphinx/html
|
%doc build/sphinx/html
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
* Mon Aug 16 2021 Miro Hrončok <mhroncok@redhat.com> - 2.10.0-1
|
* Mon Aug 16 2021 Miro Hrončok <mhroncok@redhat.com> - 2.10.0-1
|
||||||
- Update to 2.10.0
|
- Update to 2.10.0
|
||||||
|
Loading…
Reference in New Issue
Block a user