all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [PATCH] gnu: Add python-pycontracts.
@ 2017-01-12  9:32 Danny Milosavljevic
  2017-01-12 18:26 ` Marius Bakke
  0 siblings, 1 reply; 2+ messages in thread
From: Danny Milosavljevic @ 2017-01-12  9:32 UTC (permalink / raw)
  To: guix-devel

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

diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
index 4dc284d03..1cd4f168a 100644
--- a/gnu/packages/python.scm
+++ b/gnu/packages/python.scm
@@ -2201,6 +2201,38 @@ have failed since the last commit or what tests are currently failing.")
 (define-public python2-testrepository
   (package-with-python2 python-testrepository))
 
+(define-public python-pycontracts
+  (package
+    (name "python-pycontracts")
+    (version "1.7.15")
+    (source
+      (origin
+        (method url-fetch)
+        (uri (pypi-uri "PyContracts" version))
+        (sha256
+          (base32
+            "0sf41nccy5ihymiab31sfc4ylxd87fvvhbzqd8lhw7fnryskmgr4"))))
+    (build-system python-build-system)
+    (propagated-inputs
+     `(("python-decorator" ,python-decorator)
+       ("python-pyparsing" ,python-pyparsing)
+       ("python-six" ,python-six)))
+    (native-inputs
+     `(("python-nose" ,python-nose)))
+    (home-page "http://andreacensi.github.com/contracts/")
+    (synopsis "Checks declared constraints on function parameters and return
+values")
+    (description "PyContracts is a Python package that allows to declare
+constraints on function parameters and return values.   Contracts can be
+specified using Python3 annotations, in a decorator, or inside a docstring
+:type: and :rtype: tags.  PyContracts supports a basic type system, variables
+binding, arithmetic constraints, and has several specialized contracts
+(notably for Numpy arrays), as well as an extension API.")
+  (license license:lgpl3)))
+
+(define-public python2-pycontracts
+  (package-with-python2 python-pycontracts))
+
 (define-public python-coverage
   (package
     (name "python-coverage")

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

* Re: [PATCH] gnu: Add python-pycontracts.
  2017-01-12  9:32 [PATCH] gnu: Add python-pycontracts Danny Milosavljevic
@ 2017-01-12 18:26 ` Marius Bakke
  0 siblings, 0 replies; 2+ messages in thread
From: Marius Bakke @ 2017-01-12 18:26 UTC (permalink / raw)
  To: Danny Milosavljevic, guix-devel

[-- Attachment #1: Type: text/plain, Size: 2289 bytes --]

Danny Milosavljevic <dannym@scratchpost.org> writes:

> * gnu/packages/python.scm (python-pycontracts, python2-pycontracts):
>   New variables.
> ---
>  gnu/packages/python.scm | 32 ++++++++++++++++++++++++++++++++
>  1 file changed, 32 insertions(+)
>
> diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
> index 4dc284d03..1cd4f168a 100644
> --- a/gnu/packages/python.scm
> +++ b/gnu/packages/python.scm
> @@ -2201,6 +2201,38 @@ have failed since the last commit or what tests are currently failing.")
>  (define-public python2-testrepository
>    (package-with-python2 python-testrepository))
>  
> +(define-public python-pycontracts
> +  (package
> +    (name "python-pycontracts")
> +    (version "1.7.15")
> +    (source
> +      (origin
> +        (method url-fetch)
> +        (uri (pypi-uri "PyContracts" version))
> +        (sha256
> +          (base32
> +            "0sf41nccy5ihymiab31sfc4ylxd87fvvhbzqd8lhw7fnryskmgr4"))))
> +    (build-system python-build-system)
> +    (propagated-inputs
> +     `(("python-decorator" ,python-decorator)
> +       ("python-pyparsing" ,python-pyparsing)
> +       ("python-six" ,python-six)))
> +    (native-inputs
> +     `(("python-nose" ,python-nose)))
> +    (home-page "http://andreacensi.github.com/contracts/")
> +    (synopsis "Checks declared constraints on function parameters and return
> +values")

This is a little too long for my taste. Maybe just 'Declare constraints
on function parameters and return values'. Checking them is kind of
implied, me thinks.

> +    (description "PyContracts is a Python package that allows to declare
> +constraints on function parameters and return values.   Contracts can be
> +specified using Python3 annotations, in a decorator, or inside a docstring
> +:type: and :rtype: tags.  PyContracts supports a basic type system, variables
    ^^^^       ^^^^  @code{} on these.
> +binding, arithmetic constraints, and has several specialized contracts
> +(notably for Numpy arrays), as well as an extension API.")
> +  (license license:lgpl3)))
> +
> +(define-public python2-pycontracts
> +  (package-with-python2 python-pycontracts))

Otherwise LGTM, thanks! I guess you can push this yourself when the
account is set up :)


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]

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

end of thread, other threads:[~2017-01-12 18:26 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-01-12  9:32 [PATCH] gnu: Add python-pycontracts Danny Milosavljevic
2017-01-12 18:26 ` Marius Bakke

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.