2011-07-03 13:10:22 +02:00
|
|
|
#
|
|
|
|
# spec file for package python-Pygments
|
|
|
|
#
|
Accepting request 867801 from home:mcepl:branches:devel:languages:python
- Update to 2.7.4 (all what was in the update to 2.7.2 and above
it):
- Updated lexers:
* Ada (#1581)
* HTML (#1615, #1614)
* Java (#1594, #1586)
* JavaScript (#1605, #1589, #1588)
* JSON (#1569 -- this is a complete rewrite)
* Lean (#1601)
* LLVM (#1612)
* Mason (#1592)
* MySQL (#1555, #1551)
* Rust (#1608)
* Turtle (#1590, #1553)
- Deprecated JsonBareObjectLexer, which is now identical to
JsonLexer (#1600)
- The ``ImgFormatter`` now calculates the exact character
width, which fixes some issues with overlapping text (#1213,
#1611)
- Documentation fixes (#1609, #1599, #1598)
- Fixed duplicated Juttle language alias (#1604, #1606)
- Added support for Kotlin scripts (#1587)
- Removed CSS rule which forced margin to 0
OBS-URL: https://build.opensuse.org/request/show/867801
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-Pygments?expand=0&rev=75
2021-01-29 23:09:00 +01:00
|
|
|
# Copyright (c) 2021 SUSE LLC
|
2011-07-03 13:10:22 +02:00
|
|
|
#
|
|
|
|
# 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.
|
2011-07-04 12:37:48 +02:00
|
|
|
|
2018-12-04 14:51:22 +01:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2011-07-03 13:10:22 +02:00
|
|
|
#
|
|
|
|
|
2012-11-20 19:39:47 +01:00
|
|
|
|
2020-03-09 23:31:50 +01:00
|
|
|
%define skip_python2 1
|
2017-04-05 13:35:42 +02:00
|
|
|
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
2012-11-20 19:39:47 +01:00
|
|
|
Name: python-Pygments
|
2020-12-04 14:07:44 +01:00
|
|
|
# DO NOT UPGRADE UNTIL PELICAN IS COMPATIBLE!
|
2021-07-15 07:18:14 +02:00
|
|
|
Version: 2.9.0
|
2011-09-22 14:51:20 +02:00
|
|
|
Release: 0
|
2019-02-11 20:58:20 +01:00
|
|
|
Summary: A syntax highlighting package written in Python
|
2011-09-22 14:51:20 +02:00
|
|
|
License: BSD-2-Clause
|
2011-07-03 13:10:22 +02:00
|
|
|
Group: Development/Languages/Python
|
2018-07-16 15:34:14 +02:00
|
|
|
URL: http://pygments.org
|
2017-04-07 23:14:11 +02:00
|
|
|
Source: https://files.pythonhosted.org/packages/source/P/Pygments/Pygments-%{version}.tar.gz
|
2020-03-14 08:01:58 +01:00
|
|
|
BuildRequires: %{python_module base >= 3.5}
|
2019-01-10 14:08:39 +01:00
|
|
|
# We need pytest just because of its test runner, it seems even
|
2019-01-10 02:20:45 +01:00
|
|
|
# python3 stdlib unittest runner doesn't work
|
|
|
|
BuildRequires: %{python_module pytest}
|
2019-02-11 12:15:42 +01:00
|
|
|
BuildRequires: %{python_module setuptools}
|
2017-04-05 13:35:42 +02:00
|
|
|
BuildRequires: fdupes
|
|
|
|
BuildRequires: python-rpm-macros
|
2018-07-16 15:34:14 +02:00
|
|
|
Requires: python-setuptools
|
2017-08-15 14:52:10 +02:00
|
|
|
Requires(post): update-alternatives
|
Accepting request 867801 from home:mcepl:branches:devel:languages:python
- Update to 2.7.4 (all what was in the update to 2.7.2 and above
it):
- Updated lexers:
* Ada (#1581)
* HTML (#1615, #1614)
* Java (#1594, #1586)
* JavaScript (#1605, #1589, #1588)
* JSON (#1569 -- this is a complete rewrite)
* Lean (#1601)
* LLVM (#1612)
* Mason (#1592)
* MySQL (#1555, #1551)
* Rust (#1608)
* Turtle (#1590, #1553)
- Deprecated JsonBareObjectLexer, which is now identical to
JsonLexer (#1600)
- The ``ImgFormatter`` now calculates the exact character
width, which fixes some issues with overlapping text (#1213,
#1611)
- Documentation fixes (#1609, #1599, #1598)
- Fixed duplicated Juttle language alias (#1604, #1606)
- Added support for Kotlin scripts (#1587)
- Removed CSS rule which forced margin to 0
OBS-URL: https://build.opensuse.org/request/show/867801
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-Pygments?expand=0&rev=75
2021-01-29 23:09:00 +01:00
|
|
|
Requires(postun):update-alternatives
|
2011-07-03 13:10:22 +02:00
|
|
|
Provides: python-pygments = %{version}
|
2012-01-24 15:30:43 +01:00
|
|
|
Obsoletes: python-pygments < %{version}
|
2012-03-12 22:14:58 +01:00
|
|
|
BuildArch: noarch
|
2017-04-05 13:35:42 +02:00
|
|
|
%python_subpackages
|
2011-07-03 13:10:22 +02:00
|
|
|
|
|
|
|
%description
|
2019-02-11 20:58:20 +01:00
|
|
|
Pygments is a generic syntax highlighter for general use in all kinds of software
|
2011-07-03 13:10:22 +02:00
|
|
|
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
|
2019-02-11 20:58:20 +01:00
|
|
|
* support for new languages and formats can be added
|
2011-07-03 13:10:22 +02:00
|
|
|
* a number of output formats, presently HTML, LaTeX, RTF, SVG, all image
|
|
|
|
formats that PIL supports and ANSI sequences
|
|
|
|
* it is usable as a command-line tool and as a library
|
2019-02-11 20:58:20 +01:00
|
|
|
* highlights Brainfuck
|
2011-07-03 13:10:22 +02:00
|
|
|
|
|
|
|
%prep
|
2012-11-20 19:39:47 +01:00
|
|
|
%setup -q -n Pygments-%{version}
|
2019-02-11 12:15:42 +01:00
|
|
|
|
2020-12-04 14:07:44 +01:00
|
|
|
# Remove unnecessary shebang
|
2021-07-15 07:18:14 +02:00
|
|
|
# sed -i '1 { /^#!/ d }' pygments/lexers/_usd_builtins.py
|
2020-09-15 08:58:50 +02:00
|
|
|
|
2011-07-03 13:10:22 +02:00
|
|
|
%build
|
2017-04-05 13:35:42 +02:00
|
|
|
%python_build
|
2011-07-03 13:10:22 +02:00
|
|
|
|
|
|
|
%install
|
2017-04-05 13:35:42 +02:00
|
|
|
%python_install
|
2015-03-12 10:21:47 +01:00
|
|
|
install -Dm0644 doc/pygmentize.1 %{buildroot}%{_mandir}/man1/pygmentize.1
|
2020-04-14 13:38:38 +02:00
|
|
|
%python_clone -a %{buildroot}%{_bindir}/pygmentize
|
|
|
|
%python_clone -a %{buildroot}%{_mandir}/man1/pygmentize.1
|
|
|
|
%{python_expand rm -rf %{buildroot}%{$python_sitelib}/tests
|
|
|
|
%fdupes %{buildroot}%{$python_sitelib}
|
2017-08-15 14:52:10 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
%prepare_alternative pygmentize
|
|
|
|
|
|
|
|
%post
|
2020-04-14 13:38:38 +02:00
|
|
|
%{python_install_alternative pygmentize pygmentize.1}
|
2017-08-15 14:52:10 +02:00
|
|
|
|
|
|
|
%postun
|
2020-04-14 19:17:50 +02:00
|
|
|
%python_uninstall_alternative pygmentize
|
2011-07-03 13:10:22 +02:00
|
|
|
|
2012-03-12 22:14:58 +01:00
|
|
|
%check
|
2019-06-04 16:04:44 +02:00
|
|
|
%pytest
|
2011-09-22 14:51:20 +02:00
|
|
|
|
2017-04-05 13:35:42 +02:00
|
|
|
%files %{python_files}
|
2018-07-16 15:34:14 +02:00
|
|
|
%license LICENSE
|
2019-12-09 08:33:18 +01:00
|
|
|
%doc AUTHORS CHANGES
|
2017-08-15 14:52:10 +02:00
|
|
|
%python_alternative %{_bindir}/pygmentize
|
2020-04-14 13:38:38 +02:00
|
|
|
%python_alternative %{_mandir}/man1/pygmentize.1%{ext_man}
|
2012-05-14 14:40:45 +02:00
|
|
|
%{python_sitelib}/pygments/
|
2017-04-05 13:35:42 +02:00
|
|
|
%{python_sitelib}/Pygments-%{version}-py%{python_version}.egg-info/
|
2011-07-03 13:10:22 +02:00
|
|
|
|
|
|
|
%changelog
|