diff --git a/pylons_theme_support.py b/pylons_theme_support.py new file mode 100644 index 0000000..600a8f3 --- /dev/null +++ b/pylons_theme_support.py @@ -0,0 +1,75 @@ +# -*- coding: utf-8 -*- +from pygments.style import Style +from pygments.token import Keyword, Name, Comment, String, Error, \ + Number, Operator, Generic, Whitespace, Punctuation, Other, Literal + + +class PylonsStyle(Style): + """ + Pylons pygments style based on friendly style + """ + + # work in progress... + + background_color = "#f8f8f8" + default_style = "" + + styles = { + Whitespace: "#bbbbbb", + Comment: "italic #60a0b0", + Comment.Preproc: "noitalic #007020", + Comment.Special: "noitalic bg:#fff0f0", + + Keyword: "bold #007020", + Keyword.Pseudo: "nobold", + Keyword.Type: "nobold #902000", + + Operator: "#666666", + Operator.Word: "bold #007020", + + Name.Builtin: "#007020", + Name.Function: "#06287e", + Name.Class: "bold #0e84b5", + Name.Namespace: "bold #0e84b5", + Name.Exception: "#007020", + Name.Variable: "#bb60d5", + Name.Constant: "#60add5", + Name.Label: "bold #002070", + Name.Entity: "bold #d55537", + Name.Attribute: "#0e84b5", + Name.Tag: "bold #062873", + Name.Decorator: "bold #555555", + + String: "#4070a0", + String.Doc: "italic", + String.Interpol: "italic #70a0d0", + String.Escape: "bold #4070a0", + String.Regex: "#235388", + String.Symbol: "#517918", + String.Other: "#c65d09", + Number: "#40a070", + + Generic.Heading: "bold #000080", + Generic.Subheading: "bold #800080", + Generic.Deleted: "#A00000", + Generic.Inserted: "#00A000", + Generic.Error: "#FF0000", + Generic.Emph: "italic", + Generic.Strong: "bold", + Generic.Prompt: "bold #c65d09", + Generic.Output: "#888", + Generic.Traceback: "#04D", + + Error: "#a40000 bg:#fbe3e4" + } + + +class PylonsBWStyle(Style): + + background_color = "#ffffff" + default_style = "bw" + + styles = { + Error: "" + } + diff --git a/pyramid-1.3b3.tar.gz b/pyramid-1.3b3.tar.gz deleted file mode 100644 index 7411ce9..0000000 --- a/pyramid-1.3b3.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:96bfeb61a132f5a478f319f0e871e62beda17b23a0c43a1f9a81d43c89121b96 -size 2357527 diff --git a/pyramid-1.4.3.tar.gz b/pyramid-1.4.3.tar.gz new file mode 100644 index 0000000..f428e3c --- /dev/null +++ b/pyramid-1.4.3.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8484ceb740ae5e21bda40fa9f9a8fd3be2cdd323eb64ff7e21c0bf3b6388c5b7 +size 2426125 diff --git a/pyramid-dont-load-external-sphinx-theme.patch b/pyramid-dont-load-external-sphinx-theme.patch deleted file mode 100644 index 10838b4..0000000 --- a/pyramid-dont-load-external-sphinx-theme.patch +++ /dev/null @@ -1,48 +0,0 @@ -diff -ru a/docs/conf.py b/docs/conf.py ---- a/docs/conf.py 2012-01-20 16:52:28.000000000 +0100 -+++ b/docs/conf.py 2012-02-01 10:40:34.727766925 +0100 -@@ -127,43 +127,6 @@ - # Options for HTML output - # ----------------------- - --# Add and use Pylons theme --if 'sphinx-build' in ' '.join(sys.argv): # protect against dumb importers -- from subprocess import call, Popen, PIPE -- -- p = Popen('which git', shell=True, stdout=PIPE) -- git = p.stdout.read().strip() -- cwd = os.getcwd() -- _themes = os.path.join(cwd, '_themes') -- -- if not os.path.isdir(_themes): -- call([git, 'clone', 'git://github.com/Pylons/pylons_sphinx_theme.git', -- '_themes']) -- else: -- os.chdir(_themes) -- call([git, 'checkout', 'master']) -- call([git, 'pull']) -- os.chdir(cwd) -- -- sys.path.append(os.path.abspath('_themes')) -- -- parent = os.path.dirname(os.path.dirname(__file__)) -- sys.path.append(os.path.abspath(parent)) -- wd = os.getcwd() -- os.chdir(parent) -- os.system('%s setup.py test -q' % sys.executable) -- os.chdir(wd) -- -- for item in os.listdir(parent): -- if item.endswith('.egg'): -- sys.path.append(os.path.join(parent, item)) -- --html_theme_path = ['_themes'] --html_theme = 'pyramid' --html_theme_options = dict( -- github_url='https://github.com/Pylons/pyramid', --# in_progress='true' -- ) - # The style sheet to use for HTML and HTML Help pages. A file of that name - # must exist either in Sphinx' static/ path, or in one of the custom paths - # given in html_static_path. -Only in b/docs: .conf.py.swp diff --git a/python-pyramid.changes b/python-pyramid.changes index a9b06e4..ef14423 100644 --- a/python-pyramid.changes +++ b/python-pyramid.changes @@ -1,3 +1,16 @@ +------------------------------------------------------------------- +Tue Jul 30 22:03:34 UTC 2013 - hpj@urpla.net + +- Update to version 1.4.3 +- generate documentation +- fix dependencies +- enable nose tests with coverage + +------------------------------------------------------------------- +Tue Jul 16 23:44:33 UTC 2013 - hpj@urpla.net + +- add python-zope-deprecation dependency + ------------------------------------------------------------------- Fri Mar 1 06:44:25 UTC 2013 - coolo@suse.com diff --git a/python-pyramid.spec b/python-pyramid.spec index b36cbd5..83e05e3 100644 --- a/python-pyramid.spec +++ b/python-pyramid.spec @@ -2,6 +2,7 @@ # spec file for package python-pyramid # # Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2013 LISA GmbH, Bingen, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -17,18 +18,46 @@ Name: python-pyramid -Version: 1.3b3 +Version: 1.4.3 Release: 0 Url: http://pylonsproject.org Summary: The Pyramid web application development framework, a Pylons project License: BSD-4-Clause and ZPL-2.1 and MIT Group: Development/Languages/Python Source: http://pypi.python.org/packages/source/p/pyramid/pyramid-%{version}.tar.gz -Patch0: pyramid-dont-load-external-sphinx-theme.patch -BuildRoot: %{_tmppath}/%{name}-%{version}-build +Source1: pylons_theme_support.py +Requires: python-Chameleon >= 1.2.3 +Requires: python-Mako >= 0.3.6 +Requires: python-PasteDeploy >= 1.5.0 +Requires: python-WebOb >= 1.2b3 +Requires: python-repoze.lru >= 0.4 +Requires: python-translationstring >= 0.4 +Requires: python-venusian >= 1.0a3 +Requires: python-zope.deprecation >= 3.5.0 +Requires: python-zope.interface >= 3.8.0 BuildRequires: fdupes -BuildRequires: python-devel +BuildRequires: python-Chameleon >= 1.2.3 +BuildRequires: python-Mako >= 0.3.6 +BuildRequires: python-PasteDeploy >= 1.5.0 +BuildRequires: python-WebOb >= 1.2b3 BuildRequires: python-distribute +BuildRequires: python-repoze.lru >= 0.4 +BuildRequires: python-translationstring >= 0.4 +BuildRequires: python-venusian >= 1.0a3 +BuildRequires: python-zope.deprecation >= 3.5.0 +BuildRequires: python-zope.interface >= 3.8.0 +# Documentation requirements: +BuildRequires: python-Sphinx +BuildRequires: python-docutils +BuildRequires: python-pylons_sphinx_theme +BuildRequires: python-repoze.sphinx.autointerface +# Testing requirements: +BuildRequires: python-WebTest >= 1.3.1 +BuildRequires: python-coverage +BuildRequires: python-nose +BuildRequires: python-zope.component >= 3.11.0 +BuildRoot: %{_tmppath}/%{name}-%{version}-build + %if 0%{?suse_version} && 0%{?suse_version} <= 1110 %{!?python_sitelib: %global python_sitelib %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} %else @@ -45,21 +74,34 @@ Pyramid is the newest web framework produced by the Pylons Project Pyramid was previously known as repoze.bfg (http://bfg.repoze.org). +%package doc +Summary: The Pyramid web application development framework, a Pylons project +Group: Development/Languages/Python +Requires: %{name} = %{version} + +%description doc +This package contains documentation files for %{name}. + %prep %setup -q -n pyramid-%{version} -%patch0 -p1 +cp %{SOURCE1} . %build python setup.py build +python setup.py build_sphinx && rm build/sphinx/html/.buildinfo %install python setup.py install --prefix=%{_prefix} --root=%{buildroot} rm -rf %{buildroot}%{python_sitelib}/pyramid/tests # Big, hidden files, fdupes -> don't package %fdupes %{buildroot}%{python_sitelib} +%check +#python setup.py test +python setup.py nosetests --with-coverage + %files %defattr(-,root,root,-) -%doc *.txt +%doc *.txt *.rst %{_bindir}/bfg2pyramid %{_bindir}/pcreate %{_bindir}/prequest @@ -70,4 +112,8 @@ rm -rf %{buildroot}%{python_sitelib}/pyramid/tests # Big, hidden files, fdupes - %{_bindir}/pviews %{python_sitelib}/* +%files doc +%defattr(-,root,root,-) +%doc build/sphinx/html + %changelog