all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#26401: [PATCH] python-tryton (with no modules)
@ 2017-04-08 12:17 Catonano
  2017-05-08 14:33 ` Arun Isaac
  0 siblings, 1 reply; 16+ messages in thread
From: Catonano @ 2017-04-08 12:17 UTC (permalink / raw)
  To: 26401


[-- Attachment #1.1: Type: text/plain, Size: 486 bytes --]

Tryton has modules and without any module packaged, it will do nothing

But at least you can launch it and test it, you can use it for packkaging
the missing modules.

Also a service would be useful. But in order to write a service, the server
packkage has to be in already.

This is supposedly the basis for GNUealth, a notable GNU project

Gnuealth is a collection of Tryton modules and some specific Tryton
configurations. I just have to check if the versions are compatible

Thanks

[-- Attachment #1.2: Type: text/html, Size: 630 bytes --]

[-- Attachment #2: series.patch --]
[-- Type: text/x-patch, Size: 30789 bytes --]

From e42a727312a454aeb19e07cfec6cbb03fe18e183 Mon Sep 17 00:00:00 2001
From: humanitiesNerd <catonano@gmail.com>
Date: Tue, 28 Mar 2017 12:25:06 +0200
Subject: [PATCH 1/5] gnu: Add python-sql python2-sql.

* gnu/packages/python.scm (python-sql python2-sql): New variables.
---
 gnu/packages/python.scm | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)

diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
index 0746af24a..19ba3ad95 100644
--- a/gnu/packages/python.scm
+++ b/gnu/packages/python.scm
@@ -13965,3 +13965,25 @@ recognize TestCases.")
        (sha256
         (base32
          "17jlkdpqw22z1nyml5ybslilqkzmnk0dxxjml8bfghav1l5hbwd2"))))))
+
+(define-public python-sql
+  (package
+    (name "python-sql")
+    (version "0.8")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri
+             "python-sql"
+             version))
+       (sha256
+        (base32
+         "0xik939sxqfqqbpgcsnfjnws692bjip32khgwhq1ycphfy7df3h2"))))
+    (build-system python-build-system)
+    (home-page "https://python-sql.tryton.org/")
+    (synopsis "Library to write SQL queries")
+    (description "Idiomatic python function calls get transformed in well formed SQL queries.")
+    (license license:bsd-3)))
+
+(define-public python2-sql
+  (package-with-python2 python-sql))
-- 
2.12.0


From d85c1996371bbdb28f28db9cc5fe06d83e1eafd6 Mon Sep 17 00:00:00 2001
From: humanitiesNerd <catonano@gmail.com>
Date: Wed, 5 Apr 2017 15:29:56 +0200
Subject: [PATCH 2/5]  gnu: Add python-genshi, python2-genshi

 * gnu/packages/python.scm (python-genshi python2-genshi): New variables.
 * gnu/packages/patches/python-genshi-Disable-the-speedups-C-extension-on-CPython-3.3-sinc.patct: New file.
 * gnu/packages/patches/python-genshi-stripping-of-unsafe-script-tags-Python-3.4.patch: New file.
 * gnu/packages/patches/python-genshi-isstring-helper.patch: New file.
 * gnu/packages/patches/python-genshi-Add-support-for-Python-3.4-AST-support-for-NameConst.patch: New file.
 * gnu/packages/patches/python-genshi-fixing-the-tests-on-python35.patch: New file.
 * gnu/packages/patches/python-genshi-buildable-on-python27-too.patch: New file.
 * gnu/local.mk (dist_patch_DATA): Add them.
---
 gnu/local.mk                                       |   6 +
 ...-for-Python-3.4-AST-support-for-NameConst.patch | 151 +++++++++++++++++++++
 ...-speedups-C-extension-on-CPython-3.3-sinc.patch |  32 +++++
 .../python-genshi-buildable-on-python27-too.patch  |  25 ++++
 ...ython-genshi-fixing-the-tests-on-python35.patch | 112 +++++++++++++++
 .../patches/python-genshi-isstring-helper.patch    |  37 +++++
 ...tripping-of-unsafe-script-tags-Python-3.4.patch |  51 +++++++
 gnu/packages/python.scm                            |  75 ++++++++++
 8 files changed, 489 insertions(+)
 create mode 100644 gnu/packages/patches/python-genshi-Add-support-for-Python-3.4-AST-support-for-NameConst.patch
 create mode 100644 gnu/packages/patches/python-genshi-Disable-the-speedups-C-extension-on-CPython-3.3-sinc.patch
 create mode 100644 gnu/packages/patches/python-genshi-buildable-on-python27-too.patch
 create mode 100644 gnu/packages/patches/python-genshi-fixing-the-tests-on-python35.patch
 create mode 100644 gnu/packages/patches/python-genshi-isstring-helper.patch
 create mode 100644 gnu/packages/patches/python-genshi-stripping-of-unsafe-script-tags-Python-3.4.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index 93bafa282..b1a18ce25 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -873,6 +873,12 @@ dist_patch_DATA =						\
   %D%/packages/patches/python-file-double-encoding-bug.patch	\
   %D%/packages/patches/python-fix-tests.patch			\
   %D%/packages/patches/python-parse-too-many-fields.patch	\
+  %D%/packages/patches/python-genshi-Disable-the-speedups-C-extension-on-CPython-3.3-sinc.patch	\
+  %D%/packages/patches/python-genshi-stripping-of-unsafe-script-tags-Python-3.4.patch	\
+  %D%/packages/patches/python-genshi-isstring-helper.patch	\
+  %D%/packages/patches/python-genshi-Add-support-for-Python-3.4-AST-support-for-NameConst.patch	\
+  %D%/packages/patches/python-genshi-fixing-the-tests-on-python35.patch	\
+  %D%/packages/patches/python-genshi-buildable-on-python27-too.patch	\
   %D%/packages/patches/python2-rdflib-drop-sparqlwrapper.patch	\
   %D%/packages/patches/python-statsmodels-fix-tests.patch	\
   %D%/packages/patches/python-configobj-setuptools.patch	\
diff --git a/gnu/packages/patches/python-genshi-Add-support-for-Python-3.4-AST-support-for-NameConst.patch b/gnu/packages/patches/python-genshi-Add-support-for-Python-3.4-AST-support-for-NameConst.patch
new file mode 100644
index 000000000..4e40c1daa
--- /dev/null
+++ b/gnu/packages/patches/python-genshi-Add-support-for-Python-3.4-AST-support-for-NameConst.patch
@@ -0,0 +1,151 @@
+From 86b98a11559da7d1b21dc9b4c6b10511b9095bc4 Mon Sep 17 00:00:00 2001
+From: Simon Cross <hodgestar@gmail.com>
+Date: Sun, 16 Feb 2014 18:46:15 +0000
+Subject: [PATCH 05/16] Add support for Python 3.4 AST (support for
+ NameConstants and changes to existing to arguments node attributes).
+
+---
+ genshi/template/astutil.py | 31 ++++++++++++++++++++++++++++---
+ genshi/template/eval.py    | 34 +++++++++++++++++++---------------
+ 2 files changed, 47 insertions(+), 18 deletions(-)
+
+diff --git a/genshi/template/astutil.py b/genshi/template/astutil.py
+index a4c21c8..a3946b4 100644
+--- a/genshi/template/astutil.py
++++ b/genshi/template/astutil.py
+@@ -21,7 +21,7 @@ else:
+     def parse(source, mode):
+         return compile(source, '', mode, _ast.PyCF_ONLY_AST)
+ 
+-from genshi.compat import IS_PYTHON2
++from genshi.compat import IS_PYTHON2, isstring
+ 
+ __docformat__ = 'restructuredtext en'
+ 
+@@ -103,8 +103,13 @@ class ASTCodeGenerator(object):
+         self._new_line()
+         return self.visit(node.body)
+ 
++    # Python < 3.4
+     # arguments = (expr* args, identifier? vararg,
+     #              identifier? kwarg, expr* defaults)
++    #
++    # Python >= 3.4
++    # arguments = (arg* args, arg? vararg, arg* kwonlyargs, expr* kw_defaults,
++    #              arg? kwarg, expr* defaults)
+     def visit_arguments(self, node):
+         first = True
+         no_default_count = len(node.args) - len(node.defaults)
+@@ -122,13 +127,21 @@ class ASTCodeGenerator(object):
+                 self._write(', ')
+             else:
+                 first = False
+-            self._write('*' + node.vararg)
++            self._write('*')
++            if isstring(node.vararg):
++                self._write(node.vararg)
++            else:
++                self.visit(node.vararg)
+         if getattr(node, 'kwarg', None):
+             if not first:
+                 self._write(', ')
+             else:
+                 first = False
+-            self._write('**' + node.kwarg)
++            self._write('**')
++            if isstring(node.kwarg):
++                self._write(node.kwarg)
++            else:
++                self.visit(node.kwarg)
+ 
+     if not IS_PYTHON2:
+         # In Python 3 arguments get a special node
+@@ -724,6 +737,17 @@ class ASTCodeGenerator(object):
+     def visit_Name(self, node):
+         self._write(node.id)
+ 
++    # NameConstant(singleton value)
++    def visit_NameConstant(self, node):
++        if node.value is None:
++            self._write('None')
++        elif node.value is True:
++            self._write('True')
++        elif node.value is False:
++            self._write('False')
++        else:
++            raise Exception("Unknown NameConstant %r" % (node.value,))
++
+     # List(expr* elts, expr_context ctx)
+     def visit_List(self, node):
+         self._write('[')
+@@ -829,6 +853,7 @@ class ASTTransformer(object):
+     visit_Attribute = _clone
+     visit_Subscript = _clone
+     visit_Name = _clone
++    visit_NameConstant = _clone
+     visit_List = _clone
+     visit_Tuple = _clone
+ 
+diff --git a/genshi/template/eval.py b/genshi/template/eval.py
+index 89aec49..de4bc86 100644
+--- a/genshi/template/eval.py
++++ b/genshi/template/eval.py
+@@ -24,7 +24,8 @@ from genshi.template.astutil import ASTTransformer, ASTCodeGenerator, \
+ from genshi.template.base import TemplateRuntimeError
+ from genshi.util import flatten
+ 
+-from genshi.compat import get_code_params, build_code_chunk, IS_PYTHON2
++from genshi.compat import get_code_params, build_code_chunk, isstring, \
++                          IS_PYTHON2
+ 
+ __all__ = ['Code', 'Expression', 'Suite', 'LenientLookup', 'StrictLookup',
+            'Undefined', 'UndefinedError']
+@@ -495,28 +496,31 @@ class TemplateASTTransformer(ASTTransformer):
+     def __init__(self):
+         self.locals = [CONSTANTS]
+ 
++    def _process(self, names, node):
++        if not IS_PYTHON2 and isinstance(node, _ast.arg):
++            names.add(node.arg)
++        elif isstring(node):
++            names.add(node)
++        elif isinstance(node, _ast.Name):
++            names.add(node.id)
++        elif isinstance(node, _ast.alias):
++            names.add(node.asname or node.name)
++        elif isinstance(node, _ast.Tuple):
++            for elt in node.elts:
++                self._process(names, elt)
++
+     def _extract_names(self, node):
+         names = set()
+-        def _process(node):
+-            if not IS_PYTHON2 and isinstance(node, _ast.arg):
+-                names.add(node.arg)
+-            if isinstance(node, _ast.Name):
+-                names.add(node.id)
+-            elif isinstance(node, _ast.alias):
+-                names.add(node.asname or node.name)
+-            elif isinstance(node, _ast.Tuple):
+-                for elt in node.elts:
+-                    _process(elt)
+         if hasattr(node, 'args'):
+             for arg in node.args:
+-                _process(arg)
++                self._process(names, arg)
+             if hasattr(node, 'vararg'):
+-                names.add(node.vararg)
++                self._process(names, node.vararg)
+             if hasattr(node, 'kwarg'):
+-                names.add(node.kwarg)
++                self._process(names, node.kwarg)
+         elif hasattr(node, 'names'):
+             for elt in node.names:
+-                _process(elt)
++                self._process(names, elt)
+         return names
+ 
+     def visit_Str(self, node):
+-- 
+2.12.0
+
diff --git a/gnu/packages/patches/python-genshi-Disable-the-speedups-C-extension-on-CPython-3.3-sinc.patch b/gnu/packages/patches/python-genshi-Disable-the-speedups-C-extension-on-CPython-3.3-sinc.patch
new file mode 100644
index 000000000..c25c3bd7a
--- /dev/null
+++ b/gnu/packages/patches/python-genshi-Disable-the-speedups-C-extension-on-CPython-3.3-sinc.patch
@@ -0,0 +1,32 @@
+From cef2c8df44166195e1705638f9f17033a4943bb7 Mon Sep 17 00:00:00 2001
+From: Simon Cross <hodgestar@gmail.com>
+Date: Sun, 16 Feb 2014 18:32:21 +0000
+Subject: [PATCH 02/15] Disable the speedups C extension on CPython >= 3.3
+ since Genshi doesn't support the new Unicode C API yet.
+
+---
+ setup.py | 6 +++++-
+ 1 file changed, 5 insertions(+), 1 deletion(-)
+
+diff --git a/setup.py b/setup.py
+index 123a2cb..a3d748c 100755
+--- a/setup.py
++++ b/setup.py
+@@ -65,9 +65,13 @@ available.""")
+ 
+ 
+ if Feature:
++    # Optional C extension module for speeding up Genshi:
++    # Not activated by default on:
++    # - PyPy (where it harms performance)
++    # - CPython >= 3.3 (the new Unicode C API is not supported yet)
+     speedups = Feature(
+         "optional C speed-enhancements",
+-        standard = not is_pypy,
++        standard = not is_pypy and sys.version_info < (3, 3),
+         ext_modules = [
+             Extension('genshi._speedups', ['genshi/_speedups.c']),
+         ],
+-- 
+2.12.0
+
diff --git a/gnu/packages/patches/python-genshi-buildable-on-python27-too.patch b/gnu/packages/patches/python-genshi-buildable-on-python27-too.patch
new file mode 100644
index 000000000..13289fbe8
--- /dev/null
+++ b/gnu/packages/patches/python-genshi-buildable-on-python27-too.patch
@@ -0,0 +1,25 @@
+From 32bfaa7cc1c736fd62fcbb6414de9498dc20ed07 Mon Sep 17 00:00:00 2001
+From: humanitiesNerd <catonano@gmail.com>
+Date: Wed, 5 Apr 2017 15:13:06 +0200
+Subject: [PATCH 2/2] buildable on python27 too
+
+---
+ genshi/template/directives.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/genshi/template/directives.py b/genshi/template/directives.py
+index 6fd0f28..1f70ef6 100644
+--- a/genshi/template/directives.py
++++ b/genshi/template/directives.py
+@@ -266,7 +266,7 @@ class DefDirective(Directive):
+         if isinstance(ast, _ast.Call):
+             self.name = ast.func.id
+             for arg in ast.args:
+-                if isinstance(arg, _ast.Starred):
++                if hasattr(_ast, 'Starred') and isinstance(arg, _ast.Starred):
+                     # Python 3.5+
+                     self.star_args = arg.value.id
+                 else:
+-- 
+2.12.0
+
diff --git a/gnu/packages/patches/python-genshi-fixing-the-tests-on-python35.patch b/gnu/packages/patches/python-genshi-fixing-the-tests-on-python35.patch
new file mode 100644
index 000000000..f1905e7cf
--- /dev/null
+++ b/gnu/packages/patches/python-genshi-fixing-the-tests-on-python35.patch
@@ -0,0 +1,112 @@
+From ce796ad4bae5c47011876778674ad036357febdf Mon Sep 17 00:00:00 2001
+From: humanitiesNerd <catonano@gmail.com>
+Date: Wed, 5 Apr 2017 15:10:06 +0200
+Subject: [PATCH 1/2] fixing the tests on python35
+
+---
+ genshi/filters/i18n.py        |  6 ++++--
+ genshi/template/astutil.py    | 14 +++++++++++---
+ genshi/template/directives.py | 20 ++++++++++++++------
+ genshi/template/eval.py       |  5 +++++
+ 4 files changed, 34 insertions(+), 11 deletions(-)
+
+diff --git a/genshi/filters/i18n.py b/genshi/filters/i18n.py
+index 526fda4..5387fcf 100644
+--- a/genshi/filters/i18n.py
++++ b/genshi/filters/i18n.py
+@@ -1194,8 +1194,10 @@ def extract_from_code(code, gettext_functions):
+                 elif arg:
+                     strings.append(None)
+             [_add(arg) for arg in node.args]
+-            _add(node.starargs)
+-            _add(node.kwargs)
++            if hasattr(node, 'starargs'):
++                _add(node.starargs)
++            if hasattr(node, 'kwargs'):
++                _add(node.kwargs)
+             if len(strings) == 1:
+                 strings = strings[0]
+             else:
+diff --git a/genshi/template/astutil.py b/genshi/template/astutil.py
+index f4e1edd..e561846 100644
+--- a/genshi/template/astutil.py
++++ b/genshi/template/astutil.py
+@@ -151,6 +151,10 @@ class ASTCodeGenerator(object):
+         def visit_arg(self, node):
+             self._write(node.arg)
+ 
++    def visit_Starred(self, node):
++        self._write('*')
++        self.visit(node.value)
++
+     # FunctionDef(identifier name, arguments args,
+     #                           stmt* body, expr* decorator_list)
+     def visit_FunctionDef(self, node):
+@@ -664,9 +668,13 @@ class ASTCodeGenerator(object):
+             if not first:
+                 self._write(', ')
+             first = False
+-            # keyword = (identifier arg, expr value)
+-            self._write(keyword.arg)
+-            self._write('=')
++            if not keyword.arg:
++                # Python 3.5+ star-star args
++                self._write('**')
++            else:
++                # keyword = (identifier arg, expr value)
++                self._write(keyword.arg)
++                self._write('=')
+             self.visit(keyword.value)
+         if getattr(node, 'starargs', None):
+             if not first:
+diff --git a/genshi/template/directives.py b/genshi/template/directives.py
+index 7301c2d..6fd0f28 100644
+--- a/genshi/template/directives.py
++++ b/genshi/template/directives.py
+@@ -266,13 +266,21 @@ class DefDirective(Directive):
+         if isinstance(ast, _ast.Call):
+             self.name = ast.func.id
+             for arg in ast.args:
+-                # only names
+-                self.args.append(arg.id)
++                if isinstance(arg, _ast.Starred):
++                    # Python 3.5+
++                    self.star_args = arg.value.id
++                else:
++                    # only names
++                    self.args.append(arg.id)
+             for kwd in ast.keywords:
+-                self.args.append(kwd.arg)
+-                exp = Expression(kwd.value, template.filepath,
+-                                 lineno, lookup=template.lookup)
+-                self.defaults[kwd.arg] = exp
++                if kwd.arg is None:
++                    # Python 3.5+
++                    self.dstar_args = kwd.value.id
++                else:
++                    self.args.append(kwd.arg)
++                    exp = Expression(kwd.value, template.filepath,
++                                     lineno, lookup=template.lookup)
++                    self.defaults[kwd.arg] = exp
+             if getattr(ast, 'starargs', None):
+                 self.star_args = ast.starargs.id
+             if getattr(ast, 'kwargs', None):
+diff --git a/genshi/template/eval.py b/genshi/template/eval.py
+index d378419..81644a7 100644
+--- a/genshi/template/eval.py
++++ b/genshi/template/eval.py
+@@ -600,6 +600,11 @@ class TemplateASTTransformer(ASTTransformer):
+         finally:
+             self.locals.pop()
+ 
++    # Only used in Python 3.5+
++    def visit_Starred(self, node):
++        node.value = self.visit(node.value)
++        return node
++
+     def visit_Name(self, node):
+         # If the name refers to a local inside a lambda, list comprehension, or
+         # generator expression, leave it alone
+-- 
+2.12.0
+
diff --git a/gnu/packages/patches/python-genshi-isstring-helper.patch b/gnu/packages/patches/python-genshi-isstring-helper.patch
new file mode 100644
index 000000000..4f6c19bba
--- /dev/null
+++ b/gnu/packages/patches/python-genshi-isstring-helper.patch
@@ -0,0 +1,37 @@
+From cc5e07284f44cdd9beec178c69070a53f55d1323 Mon Sep 17 00:00:00 2001
+From: Simon Cross <hodgestar@gmail.com>
+Date: Sun, 16 Feb 2014 18:43:20 +0000
+Subject: [PATCH 03/15] Add isstring helper.
+
+---
+ genshi/compat.py | 10 +++++++++-
+ 1 file changed, 9 insertions(+), 1 deletion(-)
+
+diff --git a/genshi/compat.py b/genshi/compat.py
+index 9787325..6574e39 100644
+--- a/genshi/compat.py
++++ b/genshi/compat.py
+@@ -35,6 +35,15 @@ else:
+                 'Python 2 compatibility function. Not usable in Python 3.')
+ 
+ 
++# We need to test if an object is an instance of a string type in places
++
++if IS_PYTHON2:
++    def isstring(obj):
++        return isinstance(obj, basestring)
++else:
++    def isstring(obj):
++        return isinstance(obj, str)
++
+ # We need to differentiate between StringIO and BytesIO in places
+ 
+ if IS_PYTHON2:
+@@ -112,4 +121,3 @@ except NameError:
+             if not x:
+                 return False
+         return True
+-
+-- 
+2.12.0
+
diff --git a/gnu/packages/patches/python-genshi-stripping-of-unsafe-script-tags-Python-3.4.patch b/gnu/packages/patches/python-genshi-stripping-of-unsafe-script-tags-Python-3.4.patch
new file mode 100644
index 000000000..29951a614
--- /dev/null
+++ b/gnu/packages/patches/python-genshi-stripping-of-unsafe-script-tags-Python-3.4.patch
@@ -0,0 +1,51 @@
+From 0769be04c3891ae5c724c6779ba13d1d0f53b4ae Mon Sep 17 00:00:00 2001
+From: Simon Cross <hodgestar@gmail.com>
+Date: Sun, 16 Feb 2014 18:25:17 +0000
+Subject: [PATCH 01/15] Also allow stripping of unsafe script tags (Python 3.4
+ parses the second example as a tag whose name is script&xyz).
+
+---
+ genshi/filters/tests/test_html.py | 14 ++++++++++----
+ 1 file changed, 10 insertions(+), 4 deletions(-)
+
+diff --git a/genshi/filters/tests/test_html.py b/genshi/filters/tests/test_html.py
+index 0c6cfe1..45ec0da 100644
+--- a/genshi/filters/tests/test_html.py
++++ b/genshi/filters/tests/test_html.py
+@@ -368,12 +368,16 @@ def StyleSanitizer():
+ 
+ class HTMLSanitizerTestCase(unittest.TestCase):
+ 
+-    def assert_parse_error_or_equal(self, expected, exploit):
++    def assert_parse_error_or_equal(self, expected, exploit,
++                                    allow_strip=False):
+         try:
+             html = HTML(exploit)
+         except ParseError:
+             return
+-        self.assertEquals(expected, (html | HTMLSanitizer()).render())
++        sanitized_html = (html | HTMLSanitizer()).render()
++        if not sanitized_html and allow_strip:
++            return
++        self.assertEquals(expected, sanitized_html)
+ 
+     def test_sanitize_unchanged(self):
+         html = HTML(u'<a href="#">fo<br />o</a>')
+@@ -416,10 +420,12 @@ class HTMLSanitizerTestCase(unittest.TestCase):
+         html = HTML(u'<SCRIPT SRC="http://example.com/"></SCRIPT>')
+         self.assertEquals('', (html | HTMLSanitizer()).render())
+         src = u'<SCR\0IPT>alert("foo")</SCR\0IPT>'
+-        self.assert_parse_error_or_equal('&lt;SCR\x00IPT&gt;alert("foo")', src)
++        self.assert_parse_error_or_equal('&lt;SCR\x00IPT&gt;alert("foo")', src,
++                                         allow_strip=True)
+         src = u'<SCRIPT&XYZ SRC="http://example.com/"></SCRIPT>'
+         self.assert_parse_error_or_equal('&lt;SCRIPT&amp;XYZ; '
+-                                         'SRC="http://example.com/"&gt;', src)
++                                         'SRC="http://example.com/"&gt;', src,
++                                         allow_strip=True)
+ 
+     def test_sanitize_remove_onclick_attr(self):
+         html = HTML(u'<div onclick=\'alert("foo")\' />')
+-- 
+2.12.0
+
diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
index 19ba3ad95..c05a5bd70 100644
--- a/gnu/packages/python.scm
+++ b/gnu/packages/python.scm
@@ -13987,3 +13987,78 @@ recognize TestCases.")
 
 (define-public python2-sql
   (package-with-python2 python-sql))
+
+(define-public python-genshi
+  (package
+    (name "python-genshi")
+    (version "0.7")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append
+             "https://ftp.edgewall.org/pub/genshi/Genshi-"
+             version
+             ".tar.gz"))
+       (patches
+        (search-patches
+         ;; The first 4 patches are in the master branch upstream.
+         ;; see this as a reference https://genshi.edgewall.org/ticket/582
+         ;; The last 2 are NOT in any branch.
+         ;; They were sent as attachments to a ticket opened at
+         ;; https://genshi.edgewall.org/ticket/602#no1
+         "python-genshi-stripping-of-unsafe-script-tags-Python-3.4.patch"
+         "python-genshi-Disable-the-speedups-C-extension-on-CPython-3.3-sinc.patch"
+         "python-genshi-isstring-helper.patch"
+         "python-genshi-Add-support-for-Python-3.4-AST-support-for-NameConst.patch"
+         "python-genshi-fixing-the-tests-on-python35.patch"
+         "python-genshi-buildable-on-python27-too.patch"))
+       (sha256
+        (base32
+         "0lkkbp6fbwzv0zda5iqc21rr7rdldkwh3hfabfjl9i4bwq14858x"))))
+    (build-system python-build-system)
+    (home-page "https://genshi.edgewall.org/")
+    (synopsis "Toolkit for generation of output for the web")
+    (description "Genshi is a Python library that provides
+an integrated set of components for parsing, generating, and processing HTML, XML
+or other textual content for output generation on the web")
+    (license license:bsd-3)))
+
+;; the linter here claims that patch file names
+;; should start with the package name.
+;; In this case the patches are inherited from
+;; python-genshi without the "2"
+(define-public python2-genshi
+  (package-with-python2 python-genshi))
+
+
+;; this package depends on python-genshi that
+;; can be buit only with python-2
+;; so providing a python33 version of this
+;; is difficult
+(define-public python2-relatorio
+  (package
+    (name "python-relatorio")
+    (version "0.6.4")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "relatorio" version))
+       (sha256
+        (base32
+         "0lincq79mzgazwd9gh41dybjh9c3n87r83pl8nk3j79aihyfk84z"))))
+    (propagated-inputs
+     `(("lxml" ,python2-lxml)
+       ("genshi" ,python2-genshi)))
+    (arguments
+     `(#:python ,python-2))
+    ;; because relatorio depends on python-genshi
+    ;; that can be built with python-2 only
+    (build-system python-build-system)
+    (home-page "https://relatorio.tryton.org/")
+    (synopsis "Templating library able to output odt and pdf files")
+    (description
+     "Relatorio is a templating library which
+provides a way to easily output several kinds of files
+(odt, ods, png, svg, …).  Support for more filetypes can be
+easily added by creating plugins for them.")
+    (license license:lgpl3)))
-- 
2.12.0


From 6d9dff4cbbe37f172de929e44e82b384e0408f16 Mon Sep 17 00:00:00 2001
From: humanitiesNerd <catonano@gmail.com>
Date: Wed, 5 Apr 2017 16:06:06 +0200
Subject: [PATCH 3/5]  gnu Add: python-relatorio python2-relatorio

* gnu/packages/python (python-relatorio python2-relatorio): New variables.
---
 gnu/packages/python.scm | 18 ++++++------------
 1 file changed, 6 insertions(+), 12 deletions(-)

diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
index c05a5bd70..6117dc109 100644
--- a/gnu/packages/python.scm
+++ b/gnu/packages/python.scm
@@ -14030,12 +14030,7 @@ or other textual content for output generation on the web")
 (define-public python2-genshi
   (package-with-python2 python-genshi))
 
-
-;; this package depends on python-genshi that
-;; can be buit only with python-2
-;; so providing a python33 version of this
-;; is difficult
-(define-public python2-relatorio
+(define-public python-relatorio
   (package
     (name "python-relatorio")
     (version "0.6.4")
@@ -14047,12 +14042,8 @@ or other textual content for output generation on the web")
         (base32
          "0lincq79mzgazwd9gh41dybjh9c3n87r83pl8nk3j79aihyfk84z"))))
     (propagated-inputs
-     `(("lxml" ,python2-lxml)
-       ("genshi" ,python2-genshi)))
-    (arguments
-     `(#:python ,python-2))
-    ;; because relatorio depends on python-genshi
-    ;; that can be built with python-2 only
+     `(("lxml" ,python-lxml)
+       ("genshi" ,python-genshi)))
     (build-system python-build-system)
     (home-page "https://relatorio.tryton.org/")
     (synopsis "Templating library able to output odt and pdf files")
@@ -14062,3 +14053,6 @@ provides a way to easily output several kinds of files
 (odt, ods, png, svg, …).  Support for more filetypes can be
 easily added by creating plugins for them.")
     (license license:lgpl3)))
+
+(define-public python2-relatorio
+  (package-with-python2 python-relatorio))
-- 
2.12.0


From f3b90215d488741361c69f3a73730f5e5e18915f Mon Sep 17 00:00:00 2001
From: humanitiesNerd <catonano@gmail.com>
Date: Thu, 6 Apr 2017 09:37:59 +0200
Subject: [PATCH 4/5] gnu: Add python-trytond python2-trytond.

* gnu/packages/python.scm (python-trytond, python2-trytond): New variables.
---
 gnu/packages/python.scm | 50 +++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 50 insertions(+)

diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
index 6117dc109..761341aa4 100644
--- a/gnu/packages/python.scm
+++ b/gnu/packages/python.scm
@@ -14056,3 +14056,53 @@ easily added by creating plugins for them.")
 
 (define-public python2-relatorio
   (package-with-python2 python-relatorio))
+
+(define-public python-trytond
+  (package
+    (name "python-trytond")
+    (version "4.2.3")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri
+             "trytond"
+             version
+             ".tar.gz"))
+       (sha256
+        (base32
+         "1w9bc0qck9k1vzk1xvry3vb70mibaxipp229naym2fnwi282jlh5"))))
+    (build-system python-build-system)
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-before 'check 'preparations
+                     (lambda* _
+                       ;; this is used in the tests
+                       (setenv "DB_NAME" ":memory:"))))))
+    (propagated-inputs
+     `(("polib" ,python-polib)
+       ("dateutil" ,python-dateutil)
+       ("werkzeug" ,python-werkzeug)
+       ("wrapt" ,python-wrapt)
+       ("python-sql" ,python-sql)
+       ("genshi" ,python-genshi)
+       ("relatorio" ,python-relatorio)
+       ("lxml" ,python-lxml)
+       ;; there's no pyton-mysql in Guix right now
+       ;; so psycopg (postgresql) only for now
+       ("psycopg" ,python-psycopg2)))
+    (native-inputs
+     ;; this is used in the tests
+     `(("mock" ,python-mock)))
+    (home-page "http://www.tryton.org/")
+    (synopsis "Server component of Tryton")
+    (description
+   "The server of the Tryton application platform.
+A three-tiers high-level general purpose application platform
+written in Python and use Postgresql as main database engine.
+It is the core base of an Open Source ERP.
+It provides modularity, scalability and security.")
+  (license license:lgpl3)))
+
+(define-public python2-trytond
+  (package-with-python2 python-trytond))
-- 
2.12.0


From b5fc10e71f87ea3392aa9ea5b16a52c780c9e0cb Mon Sep 17 00:00:00 2001
From: humanitiesNerd <catonano@gmail.com>
Date: Thu, 6 Apr 2017 22:17:11 +0200
Subject: [PATCH 5/5] gnu: Add python2-tryton

* gnu/packages/python.scm (python2-tryton): New variable.
---
 gnu/packages/python.scm | 31 +++++++++++++++++++++++++++++++
 1 file changed, 31 insertions(+)

diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
index 761341aa4..20f1859c7 100644
--- a/gnu/packages/python.scm
+++ b/gnu/packages/python.scm
@@ -14106,3 +14106,34 @@ It provides modularity, scalability and security.")
 
 (define-public python2-trytond
   (package-with-python2 python-trytond))
+
+;; this depends on pygtk that is available or python@2 only
+(define-public python2-tryton
+  (package
+    (name "python2-tryton")
+    (version "4.2.4")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri
+             "tryton"
+             version
+             ".tar.gz"))
+       (sha256
+        (base32
+         "13a8cc3z3h9bpr2dwd7rqn8drp5ng8dava2zy7azcgwgjvkx4jzk"))))
+    (arguments
+     `(#:python ,python-2))
+    (propagated-inputs
+     `(("chardet" ,python2-chardet)
+       ("dateutil" ,python2-dateutil)
+       ("pygtk" ,python2-pygtk)))
+    (build-system python-build-system)
+    (home-page "http://www.tryton.org/")
+    (synopsis "Client component of Tryton")
+    (description "The client of the Tryton application platform.
+A three-tiers high-level general purpose application platform
+written in Python and use Postgresql as main database engine.
+It is the core base of an Open Source ERP.
+It provides modularity, scalability and security.")
+    (license license:gpl3)))
-- 
2.12.0


^ permalink raw reply related	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2017-05-27 14:39 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-04-08 12:17 bug#26401: [PATCH] python-tryton (with no modules) Catonano
2017-05-08 14:33 ` Arun Isaac
2017-05-15  6:39   ` Catonano
2017-05-15 13:19     ` Arun Isaac
2017-05-15 19:17   ` Catonano
2017-05-16 17:12     ` Arun Isaac
     [not found]     ` <c3fa946d.AEMAKXA0lrIAAAAAAAAAAAOu6r8AAAACwQwAAAAAAAW9WABZGzM6@mailjet.com>
2017-05-16 18:36       ` Catonano
2017-05-16 18:41       ` Catonano
2017-05-17  5:54         ` Arun Isaac
     [not found]         ` <4d3632b9.AEEAKq6kKpkAAAAAAAAAAAOu6r8AAAACwQwAAAAAAAW9WABZG-Wd@mailjet.com>
2017-05-17  7:45           ` Catonano
2017-05-18 17:49             ` Arun Isaac
     [not found]             ` <7e6e3d0c.ADsAALmm2EQAAAAAAAAAAAOu6r8AAAACwQwAAAAAAAW9WABZHd6n@mailjet.com>
2017-05-18 18:03               ` Catonano
2017-05-20  7:39               ` Catonano
2017-05-22 21:13                 ` Arun Isaac
2017-05-27 14:21                 ` Arun Isaac
     [not found]                 ` <57fa2a94.AEMAKvi84IwAAAAAAAAAAAOu6r8AAAACwQwAAAAAAAW9WABZKYuO@mailjet.com>
2017-05-27 14:38                   ` Catonano

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.