mirror of
https://abf.rosa.ru/djam/python38-sphinx.git
synced 2025-02-23 16:12:48 +00:00
Automatic import for version 1.0.7
This commit is contained in:
commit
f15ec82e23
3 changed files with 243 additions and 0 deletions
2
.abf.yml
Normal file
2
.abf.yml
Normal file
|
@ -0,0 +1,2 @@
|
|||
sources:
|
||||
"Sphinx-1.0.7.tar.gz": b231438a51a84d53679a226ab2036ec62bb14fd5
|
57
Sphinx-1.0b1-sagemath.patch
Normal file
57
Sphinx-1.0b1-sagemath.patch
Normal file
|
@ -0,0 +1,57 @@
|
|||
--- Sphinx-1.0b1/sphinx/highlighting.py.bak 2010-06-01 15:22:11.000000000 -0400
|
||||
+++ Sphinx-1.0b1/sphinx/highlighting.py 2010-06-01 15:25:09.000000000 -0400
|
||||
@@ -179,12 +179,17 @@
|
||||
source = source.decode()
|
||||
if not pygments:
|
||||
return self.unhighlighted(source)
|
||||
-
|
||||
+ sage = False
|
||||
+
|
||||
# find out which lexer to use
|
||||
if lang in ('py', 'python'):
|
||||
if source.startswith('>>>'):
|
||||
# interactive session
|
||||
lexer = lexers['pycon']
|
||||
+ elif source.startswith('sage:'):
|
||||
+ lexer = lexers['pycon']
|
||||
+ source = source.replace('sage:', '>>>')
|
||||
+ sage = True
|
||||
else:
|
||||
# maybe Python -- try parsing it
|
||||
if self.try_parse(source):
|
||||
@@ -221,9 +226,17 @@
|
||||
# highlight via Pygments
|
||||
try:
|
||||
if self.dest == 'html':
|
||||
- return highlight(source, lexer, self.fmter[bool(linenos)])
|
||||
+ hlsource = highlight(source, lexer,
|
||||
+ self.fmter[bool(linenos)])
|
||||
+ if sage:
|
||||
+ hlsource = hlsource.replace(r'>>>',
|
||||
+ 'sage:')
|
||||
+ hlsource = hlsource.replace(r'>>>', 'sage:')
|
||||
+ return hlsource
|
||||
else:
|
||||
hlsource = highlight(source, lexer, self.fmter[bool(linenos)])
|
||||
+ if sage:
|
||||
+ hlsource = hlsource.replace(r'>>>', 'sage:')
|
||||
if hlsource.startswith(r'\begin{Verbatim}[commandchars=\\\{\}'):
|
||||
# Pygments >= 1.2
|
||||
return hlsource.translate(tex_hl_escape_map_new)
|
||||
@@ -231,8 +244,14 @@
|
||||
except ErrorToken:
|
||||
# this is most probably not the selected language,
|
||||
# so let it pass unhighlighted
|
||||
- return self.unhighlighted(source)
|
||||
-
|
||||
+ uhlsource = self.unhighlighted(source)
|
||||
+ if sage:
|
||||
+ uhlsource = uhlsource.replace('@textgreater[]@textgreater[]@textgreater[]',
|
||||
+ '@PYGaO[sage: ]')
|
||||
+ uhlsource = uhlsource.replace(r'>>>', 'sage:')
|
||||
+ uhlsource = uhlsource.replace(r'>>>', 'sage:')
|
||||
+ return uhlsource
|
||||
+
|
||||
def get_stylesheet(self):
|
||||
if not pygments:
|
||||
if self.dest == 'latex':
|
184
python-sphinx.spec
Normal file
184
python-sphinx.spec
Normal file
|
@ -0,0 +1,184 @@
|
|||
%define tarname Sphinx
|
||||
%define name python-sphinx
|
||||
%define version 1.0.7
|
||||
%define release %mkrel 3
|
||||
|
||||
# disable these for bootstrapping nose and sphinx
|
||||
%define enable_tests 1
|
||||
%define enable_doc 1
|
||||
|
||||
Summary: Python documentation generator
|
||||
Name: %{name}
|
||||
Version: %{version}
|
||||
Release: %{release}
|
||||
Source0: http://pypi.python.org/packages/source/S/%{tarname}/%{tarname}-%{version}.tar.gz
|
||||
Patch0: Sphinx-1.0b1-sagemath.patch
|
||||
License: BSD
|
||||
Group: Development/Python
|
||||
Url: http://sphinx.pocoo.org/
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot
|
||||
BuildArch: noarch
|
||||
Requires: python-pkg-resources
|
||||
Requires: python-docutils >= 0.5
|
||||
Requires: python-pygments >= 0.8
|
||||
Requires: python-jinja2 >= 2.2
|
||||
BuildRequires: python-setuptools
|
||||
Requires: python-pygments >= 0.8
|
||||
%if %enable_doc
|
||||
BuildRequires: python-docutils >= 0.5
|
||||
BuildRequires: python-jinja2 >= 2.2
|
||||
%endif
|
||||
%if %enable_tests
|
||||
BuildRequires: python-nose
|
||||
%endif
|
||||
%py_requires -d
|
||||
|
||||
%description
|
||||
Sphinx is a tool that facilitates the creation of beautiful
|
||||
documentation for Python projects from reStructuredText sources. It
|
||||
was originally created to format the new documentation for Python, but
|
||||
has since been cleaned up in the hope that it will be useful in many
|
||||
other projects.
|
||||
|
||||
%prep
|
||||
%setup -q -n %{tarname}-%{version}
|
||||
%patch0 -p1
|
||||
|
||||
%install
|
||||
%__rm -rf %{buildroot}
|
||||
PYTHONDONTWRITEBYTECODE= %__python setup.py install --root=%{buildroot} --record=FILE_LIST
|
||||
%if %enable_doc
|
||||
%__make -C doc html
|
||||
%endif
|
||||
%clean
|
||||
%__rm -rf %{buildroot}
|
||||
|
||||
%check
|
||||
%if %enable_tests
|
||||
pushd tests
|
||||
%__python run.py
|
||||
popd
|
||||
%endif
|
||||
|
||||
%files -f FILE_LIST
|
||||
%defattr(-,root,root)
|
||||
%doc AUTHORS CHANGES LICENSE TODO
|
||||
%if %enable_doc
|
||||
%doc doc/_build/html/
|
||||
%endif
|
||||
|
||||
|
||||
%changelog
|
||||
* Thu Jun 09 2011 Antoine Ginies <aginies@mandriva.com> 1.0.7-3mdv2011.0
|
||||
+ Revision: 683472
|
||||
- rebuild
|
||||
|
||||
* Thu May 05 2011 Oden Eriksson <oeriksson@mandriva.com> 1.0.7-2
|
||||
+ Revision: 668036
|
||||
- mass rebuild
|
||||
|
||||
* Tue Jan 18 2011 Lev Givon <lev@mandriva.org> 1.0.7-1
|
||||
+ Revision: 631630
|
||||
- Update to 1.0.7.
|
||||
|
||||
* Fri Nov 12 2010 Lev Givon <lev@mandriva.org> 1.0.5-1mdv2011.0
|
||||
+ Revision: 596694
|
||||
- Update to 1.0.5.
|
||||
|
||||
* Sat Oct 30 2010 Michael Scherer <misc@mandriva.org> 1.0.4-3mdv2011.0
|
||||
+ Revision: 590417
|
||||
- reenable test and documentation, now that requirement are here
|
||||
|
||||
* Sat Oct 30 2010 Michael Scherer <misc@mandriva.org> 1.0.4-2mdv2011.0
|
||||
+ Revision: 590369
|
||||
- also fix the documentation generation ( bootstraping problem, since jinja2 requires sphinx too )
|
||||
- disable test ( as nose requires sphinx, and sphinx requires nose, they cannot be upgraded to 2.7 )
|
||||
- rebuild for python 2.7
|
||||
|
||||
* Fri Sep 17 2010 Lev Givon <lev@mandriva.org> 1.0.4-1mdv2011.0
|
||||
+ Revision: 579194
|
||||
- Update to 1.0.4.
|
||||
|
||||
* Wed Sep 15 2010 Lev Givon <lev@mandriva.org> 1.0.3-1mdv2011.0
|
||||
+ Revision: 578780
|
||||
- Update to 1.0.3.
|
||||
|
||||
* Tue Jul 27 2010 Lev Givon <lev@mandriva.org> 0.6.7-1mdv2011.0
|
||||
+ Revision: 562106
|
||||
- Update to 0.6.7.
|
||||
- Update to 0.6.6.
|
||||
|
||||
* Thu Mar 11 2010 Lev Givon <lev@mandriva.org> 0.6.5-1mdv2010.1
|
||||
+ Revision: 518262
|
||||
- Update to 0.6.5.
|
||||
|
||||
* Wed Jan 13 2010 Lev Givon <lev@mandriva.org> 0.6.4-1mdv2010.1
|
||||
+ Revision: 491048
|
||||
- Update to 0.6.4.
|
||||
|
||||
* Tue Sep 08 2009 Lev Givon <lev@mandriva.org> 0.6.3-1mdv2010.0
|
||||
+ Revision: 433689
|
||||
- Update to 0.6.3.
|
||||
Build docs as html.
|
||||
|
||||
* Wed Aug 05 2009 Paulo Andrade <pcpa@mandriva.com.br> 0.6.2-2mdv2010.0
|
||||
+ Revision: 409716
|
||||
- Add sagemath patch to python-sphinx.
|
||||
|
||||
* Wed Jun 17 2009 Lev Givon <lev@mandriva.org> 0.6.2-1mdv2010.0
|
||||
+ Revision: 386763
|
||||
- Update to 0.6.2.
|
||||
|
||||
* Fri May 22 2009 Lev Givon <lev@mandriva.org> 0.6.1-1mdv2010.0
|
||||
+ Revision: 378621
|
||||
- Update to 0.6.1.
|
||||
|
||||
* Mon May 04 2009 Lev Givon <lev@mandriva.org> 0.5.2-2mdv2010.0
|
||||
+ Revision: 371821
|
||||
- Fix requirements.
|
||||
|
||||
* Tue Mar 24 2009 Lev Givon <lev@mandriva.org> 0.5.2-1mdv2010.0
|
||||
+ Revision: 360951
|
||||
- Update to 0.5.2.
|
||||
Change python-setuptools install requirement to python-pkg-resources.
|
||||
|
||||
* Sun Jan 04 2009 Jérôme Soyer <saispo@mandriva.org> 0.5.1-1mdv2009.1
|
||||
+ Revision: 324276
|
||||
- New upstream release
|
||||
|
||||
* Sun Dec 28 2008 Funda Wang <fwang@mandriva.org> 0.5-2mdv2009.1
|
||||
+ Revision: 320265
|
||||
- rebuild for new python
|
||||
|
||||
* Tue Dec 02 2008 Lev Givon <lev@mandriva.org> 0.5-1mdv2009.1
|
||||
+ Revision: 308946
|
||||
- Update to 0.5.
|
||||
|
||||
* Sun Oct 19 2008 Lev Givon <lev@mandriva.org> 0.4.3-1mdv2009.1
|
||||
+ Revision: 295422
|
||||
- Update to 0.4.3.
|
||||
|
||||
* Wed Aug 06 2008 Lev Givon <lev@mandriva.org> 0.4.2-2mdv2009.0
|
||||
+ Revision: 264333
|
||||
- Add setuptools as an install requirement
|
||||
(pkg_resources needed by sphinx-build).
|
||||
|
||||
* Wed Aug 06 2008 Lev Givon <lev@mandriva.org> 0.4.2-1mdv2009.0
|
||||
+ Revision: 264111
|
||||
- Update to 0.4.2.
|
||||
|
||||
* Fri Jul 11 2008 Lev Givon <lev@mandriva.org> 0.4.1-1mdv2009.0
|
||||
+ Revision: 233844
|
||||
- Update to 0.4.1.
|
||||
|
||||
* Mon Jun 23 2008 Lev Givon <lev@mandriva.org> 0.4-1mdv2009.0
|
||||
+ Revision: 228282
|
||||
- Update to 0.4.
|
||||
|
||||
* Fri May 30 2008 Lev Givon <lev@mandriva.org> 0.3-1mdv2009.0
|
||||
+ Revision: 213482
|
||||
- import python-sphinx
|
||||
|
||||
|
||||
* Thu May 29 2008 Lev Givon <lev@mandriva.org> 0.3-1mdv2008.1
|
||||
- Package for Mandriva.
|
Loading…
Add table
Reference in a new issue