unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* [PATCH] gnu: Add python2-rpython.
@ 2016-10-29 11:28 Alex Vong
  2016-10-29 14:10 ` Hartmut Goebel
  0 siblings, 1 reply; 6+ messages in thread
From: Alex Vong @ 2016-10-29 11:28 UTC (permalink / raw)
  To: guix-devel


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

Hello,

This patch adds the RPython toolchain, which can be used to implement
interpreters and virtual machines, for examples Pypy. Right now it
supports only Python 2.


[-- Attachment #1.2: 0001-gnu-Add-python2-rpython.patch --]
[-- Type: text/x-diff, Size: 2427 bytes --]

From 685faf110cddbf80b3a390b86baa1e5b5cee3b80 Mon Sep 17 00:00:00 2001
From: Alex Vong <alexvong1995@gmail.com>
Date: Sat, 29 Oct 2016 18:10:00 +0800
Subject: [PATCH] gnu: Add python2-rpython.

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

diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
index f7485ad..d25d469 100644
--- a/gnu/packages/python.scm
+++ b/gnu/packages/python.scm
@@ -29,6 +29,7 @@
 ;;; Copyright © 2016 Marius Bakke <mbakke@fastmail.com>
 ;;; Copyright © 2016 Stefan Reichoer <stefan@xsteve.at>
 ;;; Copyright © 2016 Dylan Jeffers <sapientech@sapientech@openmailbox.org>
+;;; Copyright © 2016 Alex Vong <alexvong1995@gmail.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -3150,6 +3151,37 @@ writing C extensions for Python as easy as Python itself.")
     (inputs
      `(("python-2" ,python-2))))) ; this is not automatically changed
 
+;;; The RPython toolchain currently does not support Python 3.
+(define-public python2-rpython
+  (package
+    (name "python2-rpython")
+    (version "0.1.4")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append
+             "https://pypi.python.org/packages/00/2e/"
+             "69319934a6049b368c05845eaab100ecea2213a96e59fb14416a0a6c5648/"
+             "rpython-"
+             version
+             ".tar.gz"))
+       (sha256
+        (base32
+         "07pps06fq4c4wmi5ii0sgh9zgwniz5y7frqhm28g3a154l163fxc"))))
+    (build-system python-build-system)
+    (arguments `(#:python ,python-2))
+    (propagated-inputs
+     `(("python2-setuptools" ,python2-setuptools)))
+    (native-inputs
+     ;; needed for running tests
+     `(("python2-pytest" ,python2-pytest)))
+    (home-page "https://rpython.readthedocs.org")
+    (synopsis "Framework for implementing interpreters and virtual machines")
+    (description "RPython is a translation and support framework for
+producing implementations of dynamic languages, emphasizing a clean separation
+between language specification and implementation aspects.")
+    (license license:expat)))
+
 ;; This version of numpy is missing the documentation and is only used to
 ;; build matplotlib which is required to build numpy's documentation.
 (define python-numpy-bootstrap
-- 
2.10.1


[-- Attachment #1.3: Type: text/plain, Size: 14 bytes --]


Cheers,
Alex

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

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

* Re: [PATCH] gnu: Add python2-rpython.
  2016-10-29 11:28 [PATCH] gnu: Add python2-rpython Alex Vong
@ 2016-10-29 14:10 ` Hartmut Goebel
  2016-10-29 15:54   ` Alex Vong
  0 siblings, 1 reply; 6+ messages in thread
From: Hartmut Goebel @ 2016-10-29 14:10 UTC (permalink / raw)
  To: guix-devel

Am 29.10.2016 um 13:28 schrieb Alex Vong:
> +       (uri (string-append
> +             "https://pypi.python.org/packages/00/2e/"
> +             "69319934a6049b368c05845eaab100ecea2213a96e59fb14416a0a6c5648/"
> +             "rpython-"
> +             version
> +             ".tar.gz"))

Please try to use "pypi-url" here like.

> +    (propagated-inputs
> +     `(("python2-setuptools" ,python2-setuptools)))

Please add a comment why does this have to be propagated.

-- 
Regards
Hartmut Goebel

| Hartmut Goebel          | h.goebel@crazy-compilers.com               |
| www.crazy-compilers.com | compilers which you thought are impossible |

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

* Re: [PATCH] gnu: Add python2-rpython.
  2016-10-29 14:10 ` Hartmut Goebel
@ 2016-10-29 15:54   ` Alex Vong
  2016-10-29 18:26     ` Marius Bakke
  0 siblings, 1 reply; 6+ messages in thread
From: Alex Vong @ 2016-10-29 15:54 UTC (permalink / raw)
  To: Hartmut Goebel; +Cc: guix-devel


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

Hartmut Goebel <h.goebel@crazy-compilers.com> writes:

> Am 29.10.2016 um 13:28 schrieb Alex Vong:
>> +       (uri (string-append
>> +             "https://pypi.python.org/packages/00/2e/"
>> +             "69319934a6049b368c05845eaab100ecea2213a96e59fb14416a0a6c5648/"
>> +             "rpython-"
>> +             version
>> +             ".tar.gz"))
>
> Please try to use "pypi-url" here like.
>
>> +    (propagated-inputs
>> +     `(("python2-setuptools" ,python2-setuptools)))
>
> Please add a comment why does this have to be propagated.

Thanks for catching these. I am using the template of guix-import
without paying too much attention. Here is the new patch:


[-- Attachment #1.2: 0001-gnu-Add-python2-rpython.patch --]
[-- Type: text/x-diff, Size: 2188 bytes --]

From f4b6a48598f04fa73366bc98d966251bafddfb76 Mon Sep 17 00:00:00 2001
From: Alex Vong <alexvong1995@gmail.com>
Date: Sat, 29 Oct 2016 18:10:00 +0800
Subject: [PATCH] gnu: Add python2-rpython.

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

diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
index f7485ad..8d7b184 100644
--- a/gnu/packages/python.scm
+++ b/gnu/packages/python.scm
@@ -29,6 +29,7 @@
 ;;; Copyright © 2016 Marius Bakke <mbakke@fastmail.com>
 ;;; Copyright © 2016 Stefan Reichoer <stefan@xsteve.at>
 ;;; Copyright © 2016 Dylan Jeffers <sapientech@sapientech@openmailbox.org>
+;;; Copyright © 2016 Alex Vong <alexvong1995@gmail.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -3150,6 +3151,30 @@ writing C extensions for Python as easy as Python itself.")
     (inputs
      `(("python-2" ,python-2))))) ; this is not automatically changed
 
+;;; The RPython toolchain currently does not support Python 3.
+(define-public python2-rpython
+  (package
+    (name "python2-rpython")
+    (version "0.1.4")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "rpython" version))
+       (sha256
+        (base32
+         "07pps06fq4c4wmi5ii0sgh9zgwniz5y7frqhm28g3a154l163fxc"))))
+    (build-system python-build-system)
+    (arguments `(#:python ,python-2))
+    (native-inputs
+     `(("python2-pytest" ,python2-pytest) ; needed for running tests
+       ("python2-setuptools" ,python2-setuptools)))
+    (home-page "https://rpython.readthedocs.org")
+    (synopsis "Framework for implementing interpreters and virtual machines")
+    (description "RPython is a translation and support framework for
+producing implementations of dynamic languages, emphasizing a clean separation
+between language specification and implementation aspects.")
+    (license license:expat)))
+
 ;; This version of numpy is missing the documentation and is only used to
 ;; build matplotlib which is required to build numpy's documentation.
 (define python-numpy-bootstrap
-- 
2.10.1


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

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

* Re: [PATCH] gnu: Add python2-rpython.
  2016-10-29 15:54   ` Alex Vong
@ 2016-10-29 18:26     ` Marius Bakke
  2016-10-29 21:49       ` Ricardo Wurmus
  0 siblings, 1 reply; 6+ messages in thread
From: Marius Bakke @ 2016-10-29 18:26 UTC (permalink / raw)
  To: Alex Vong, Hartmut Goebel; +Cc: guix-devel

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

Alex Vong <alexvong1995@gmail.com> writes:

> * gnu/packages/python.scm (python2-rpython): New variable.

[...]

> +;;; The RPython toolchain currently does not support Python 3.
   ^^^
Only two semicolons here. The rest LGTM.

> +(define-public python2-rpython
> +  (package
> +    (name "python2-rpython")
> +    (version "0.1.4")
> +    (source
> +     (origin
> +       (method url-fetch)
> +       (uri (pypi-uri "rpython" version))
> +       (sha256
> +        (base32
> +         "07pps06fq4c4wmi5ii0sgh9zgwniz5y7frqhm28g3a154l163fxc"))))
> +    (build-system python-build-system)
> +    (arguments `(#:python ,python-2))
> +    (native-inputs
> +     `(("python2-pytest" ,python2-pytest) ; needed for running tests
> +       ("python2-setuptools" ,python2-setuptools)))
> +    (home-page "https://rpython.readthedocs.org")
> +    (synopsis "Framework for implementing interpreters and virtual machines")
> +    (description "RPython is a translation and support framework for
> +producing implementations of dynamic languages, emphasizing a clean separation
> +between language specification and implementation aspects.")
> +    (license license:expat)))
> +
>  ;; This version of numpy is missing the documentation and is only used to
>  ;; build matplotlib which is required to build numpy's documentation.
>  (define python-numpy-bootstrap
> -- 
> 2.10.1

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

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

* Re: [PATCH] gnu: Add python2-rpython.
  2016-10-29 18:26     ` Marius Bakke
@ 2016-10-29 21:49       ` Ricardo Wurmus
  2016-10-30  5:50         ` Alex Vong
  0 siblings, 1 reply; 6+ messages in thread
From: Ricardo Wurmus @ 2016-10-29 21:49 UTC (permalink / raw)
  To: Marius Bakke; +Cc: guix-devel


Marius Bakke <mbakke@fastmail.com> writes:

> Alex Vong <alexvong1995@gmail.com> writes:
>
>> * gnu/packages/python.scm (python2-rpython): New variable.
>
> [...]
>
>> +;;; The RPython toolchain currently does not support Python 3.
>    ^^^
> Only two semicolons here. The rest LGTM.

I committed the patch with this change.  Thanks!

~~ Ricardo

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

* Re: [PATCH] gnu: Add python2-rpython.
  2016-10-29 21:49       ` Ricardo Wurmus
@ 2016-10-30  5:50         ` Alex Vong
  0 siblings, 0 replies; 6+ messages in thread
From: Alex Vong @ 2016-10-30  5:50 UTC (permalink / raw)
  To: Ricardo Wurmus; +Cc: guix-devel

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

Ricardo Wurmus <rekado@elephly.net> writes:

> Marius Bakke <mbakke@fastmail.com> writes:
>
>> Alex Vong <alexvong1995@gmail.com> writes:
>>
>>> * gnu/packages/python.scm (python2-rpython): New variable.
>>
>> [...]
>>
>>> +;;; The RPython toolchain currently does not support Python 3.
>>    ^^^
>> Only two semicolons here. The rest LGTM.
>
> I committed the patch with this change.  Thanks!
>
> ~~ Ricardo

Thanks for the reviews!

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

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

end of thread, other threads:[~2016-10-30  5:51 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-10-29 11:28 [PATCH] gnu: Add python2-rpython Alex Vong
2016-10-29 14:10 ` Hartmut Goebel
2016-10-29 15:54   ` Alex Vong
2016-10-29 18:26     ` Marius Bakke
2016-10-29 21:49       ` Ricardo Wurmus
2016-10-30  5:50         ` Alex Vong

Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).