1 Star 0 Fork 26

cuibaobao/python-pygments

forked from src-openEuler/python-pygments
关闭
 
加入 Gitee
与超过 1400万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
python-pygments.spec 2.31 KB
一键复制 编辑 原始数据 按行查看 历史
dogsheng 提交于 2019-12-14 21:12 +08:00 . Package init
%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!
Name: python-pygments
Summary: Syntax highlighting engine written in Python
Version: 2.2.0
Release: 15
License: BSD
URL: http://pygments.org/
Source0: https://pypi.org/packages/source/P/Pygments/Pygments-%{version}.tar.gz
Patch0: import-directive.patch
Patch1: pep479.patch
BuildArch: noarch
%description
%{_description}
%package -n python2-pygments
BuildRequires: python2-devel >= 2.4, python2-setuptools
BuildRequires: python2-nose, python2-sphinx
Summary: Syntax highlighting engine written in Python
%{?python_provide:%python_provide python2-pygments}
%description -n python2-pygments
%{_description}
%package -n python3-pygments
BuildRequires: python3-devel, python3-setuptools, python3-nose
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
%py2_build
%py3_build
%install
%py2_install
%{__python2} setup.py build_sphinx
pushd doc
install -d %{buildroot}%{_mandir}/man1
mv pygmentize.1 %{buildroot}%{_mandir}/man1/pygmentize.1
popd
cp -r doc/docs doc/reST
%py3_install
%check
make test PYTHON=%{__python2}
make test PYTHON=%{__python3}
%files -n python2-pygments
%license LICENSE
%{python2_sitelib}/*
%files -n python3-pygments
%license LICENSE
%{python3_sitelib}/*
%{_bindir}/pygmentize
%files help
%doc AUTHORS CHANGES build/sphinx/html doc/reST TODO
%lang(en) %{_mandir}/man1/pygmentize.1*
%changelog
* Fri Dec 6 2019 caomeng<caomeng5@huawei.com> - 2.2.0-15
- Package init
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/cuibb1/python-pygments.git
git@gitee.com:cuibb1/python-pygments.git
cuibb1
python-pygments
python-pygments
master

搜索帮助