mirror of
https://abf.rosa.ru/djam/python-pygments.git
synced 2025-02-23 15:02:48 +00:00
Split python3 module to a separate package
This commit is contained in:
parent
61a25b6c5c
commit
7b4ecbd506
1 changed files with 2 additions and 51 deletions
|
@ -12,7 +12,6 @@ Url: http://pygments.org/
|
|||
Source0: http://pypi.python.org/packages/source/P/%{tarname}/%{tarname}-%{version}.tar.gz
|
||||
BuildArch: noarch
|
||||
BuildRequires: python-setuptools
|
||||
BuildRequires: python3-distribute
|
||||
BuildRequires: python-devel
|
||||
Requires: python-pkg-resources
|
||||
|
||||
|
@ -30,71 +29,23 @@ prettify source code. Highlights are:
|
|||
* it is usable as a command-line tool and as a library
|
||||
* ... and it highlights even Brainf*ck!
|
||||
|
||||
%package -n python3-%{module}
|
||||
Summary: Python documentation generator
|
||||
|
||||
Group: Development/Python
|
||||
Requires: python3-pkg-resources
|
||||
|
||||
%description -n python3-%{module}
|
||||
Pygments is a syntax highlighting package written in Python. It 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, increasing quality by a fair amount
|
||||
* support for new languages and formats are added easily
|
||||
* a number of output formats, presently HTML, LaTeX, RTF, SVG and ANSI
|
||||
sequences
|
||||
* it is usable as a command-line tool and as a library
|
||||
* ... and it highlights even Brainf*ck!
|
||||
|
||||
%prep
|
||||
%setup -qc
|
||||
tar xzf %{SOURCE0}
|
||||
mv %{tarname}-%{version} python2
|
||||
cp -r python2 python3
|
||||
%setup -qn %{tarname}-%{version}
|
||||
|
||||
%build
|
||||
pushd python2
|
||||
python setup.py build
|
||||
popd
|
||||
pushd python3
|
||||
python3 setup.py build
|
||||
popd
|
||||
|
||||
%install
|
||||
pushd python3
|
||||
PYTHONDONTWRITEBYTECODE= python3 setup.py install --skip-build --root=%{buildroot}
|
||||
mv %{buildroot}%{_bindir}/pygmentize %{buildroot}%{_bindir}/py3gmentize
|
||||
mv docs/build html
|
||||
|
||||
mkdir -p %{buildroot}%{_mandir}/man1
|
||||
sed -i 's/\/usr\/share\/doc\/python-pygments\//\/usr\/share\/doc\/python3-pygments\/html\//' docs/pygmentize.1
|
||||
install -m 644 docs/pygmentize.1 %{buildroot}%{_mandir}/man1/py3gmentize.1
|
||||
popd
|
||||
|
||||
pushd python2
|
||||
PYTHONDONTWRITEBYTECODE= python setup.py install --skip-build --root=%{buildroot}
|
||||
mv docs/build html
|
||||
|
||||
mkdir -p %{buildroot}%{_mandir}/man1
|
||||
sed -i 's/\/usr\/share\/doc\/python-pygments\//\/usr\/share\/doc\/python-pygments\/html\//' docs/pygmentize.1
|
||||
install -m 644 docs/pygmentize.1 %{buildroot}%{_mandir}/man1
|
||||
popd
|
||||
|
||||
%files
|
||||
%doc python2/AUTHORS python2/CHANGES python2/LICENSE python2/TODO python2/html/
|
||||
%doc AUTHORS CHANGES LICENSE TODO html/
|
||||
%{_bindir}/pygmentize
|
||||
%{py_puresitedir}/pygments/*
|
||||
%{py_puresitedir}/Pygments-*
|
||||
%{_mandir}/man1/pygmentize.*
|
||||
|
||||
%files -n python3-%{module}
|
||||
%doc python3/AUTHORS python3/CHANGES python3/LICENSE python3/TODO python3/html/
|
||||
%{_bindir}/py3gmentize
|
||||
%{py3_puresitedir}/pygments/*
|
||||
%{py3_puresitedir}/Pygments-*
|
||||
%{_mandir}/man1/py3gmentize.*
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue