[PATCH] gnu: Add python-pythonanywhere.

  • Done
  • quality assurance status badge
Details
3 participants
  • Filip Lajszczak
  • Ludovic Courtès
  • Maxime Devos
Owner
unassigned
Submitted by
Filip Lajszczak
Severity
normal
F
F
Filip Lajszczak wrote on 8 May 2021 15:28
(address . guix-patches@gnu.org)(name . Filip Lajszczak)(address . filip@lajszczak.dev)
20210508132849.26030-1-filip@lajszczak.dev
* gnu/packages/python-xyz.scm (python-pythonanywhere): New variable.
---
gnu/packages/python-xyz.scm | 47 +++++++++++++++++++++++++++++++++++++
1 file changed, 47 insertions(+)

Toggle diff (67 lines)
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index de7c303b6c..083d26c212 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -99,6 +99,7 @@
;;; Copyright © 2021 Sharlatan Hellseher <sharlatanus@gmail.com>
;;; Copyright © 2021 Ellis Keny? <me@elken.dev>
;;; Copyright © 2021 LibreMiami <packaging-guix@libremiami.org>
+;;; Copyright © 2021 Filip Lajszczak <filip@lajszczak.dev>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -11455,6 +11456,52 @@ programmatically with command-line parsers like @code{getopt} and
(define-public python2-docopt
(package-with-python2 python-docopt))
+(define-public python-pythonanywhere
+ (package
+ (name "python-pythonanywhere")
+ (version "0.9.8")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/pythonanywhere/helper_scripts")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "0yd0hk9awfk4kc99nn008by8jbz2h709qvzzixjyjhcg6xjmc2zh"))))
+ (build-system python-build-system)
+ (arguments
+ `(#:phases (modify-phases %standard-phases
+ (add-before 'check 'change-home
+ (lambda _
+ (setenv "HOME" "/tmp") #t))
+ (replace 'check
+ (lambda _
+ (invoke "pytest" "-m" "not slowtest") #t)))))
+ (native-inputs
+ `(("python-pytest" ,python-pytest)
+ ("python-psutil" ,python-psutil)
+ ("python-responses" ,python-responses)
+ ("python-pytest-mock" ,python-pytest-mock)))
+ (propagated-inputs
+ `(("python-dateutil" ,python-dateutil)
+ ("python-docopt" ,python-docopt)
+ ("python-packaging" ,python-packaging)
+ ("python-requests" ,python-requests)
+ ("python-schema" ,python-schema)
+ ("python-tabulate" ,python-tabulate)
+ ("python-typer" ,python-typer)))
+ (home-page
+ "https://github.com/pythonanywhere/helper_scripts/")
+ (synopsis
+ "PythonAnywhere helper tools for users")
+ (description
+ "PythonAnywhere helper tools for users. Scripts, cli and python wrapper around API
+that allows to manage web apps and scheduled tasks. Includes single-command deployment
+for Django Girls tutorial.")
+ (license license:expat)))
+
(define-public python-pythondialog
(package
(name "python-pythondialog")
--
2.31.1
M
M
Maxime Devos wrote on 8 May 2021 23:16
864b6bb2288824630d6e28d01c22617443c1e5b8.camel@telenet.be
Filip Lajszczak schreef op za 08-05-2021 om 15:28 [+0200]:
Toggle quote (8 lines)
> * gnu/packages/python-xyz.scm (python-pythonanywhere): New variable.
> [...]
> + (arguments
> + `(#:phases (modify-phases %standard-phases
> + (add-before 'check 'change-home
> + (lambda _
> + (setenv "HOME" "/tmp") #t))

Phases do not need to return #t anymore; the warning you get if you
remove it is misleading. The warning will disappear once core-updates
is merged.

Toggle quote (4 lines)
> + (replace 'check
> + (lambda _
> + (invoke "pytest" "-m" "not slowtest") #t)))))

To support "guix build --without-tests" and cross-compilation, make this

Toggle quote (5 lines)
> + (replace 'check
> + (lambda* (#:key tests? #:allow-other-keys)
> + (when tests?
> + (invoke "pytest" "-m" "not slowtest"))))

The native-inputs and propagated-inputs seem about right to me,
but I haven't tested.

Greetings,
Maxime
-----BEGIN PGP SIGNATURE-----

iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYJb/pxccbWF4aW1lZGV2
b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7oHsAP9MRqDkHo5SfMEbPsSe7W1WYZGk
p0Ub8c8I2Fo1DG0kMwD9Hn1LNz/vvuZJjZZLsRzgWN4zvep/TCXAHCEV39C97wM=
=qZN0
-----END PGP SIGNATURE-----


F
F
Filip Lajszczak wrote on 9 May 2021 15:06
(name . Maxime Devos)(address . maximedevos@telenet.be)(address . 48289@debbugs.gnu.org)
CAKk7972xs6cTWOU=2REiMC1SAMfxnDWCtaVx0K-fM-1eNdYtgQ@mail.gmail.com
On Sat, 8 May 2021 at 22:16, Maxime Devos <maximedevos@telenet.be> wrote:
Toggle quote (4 lines)
> Phases do not need to return #t anymore; the warning you get if you
> remove it is misleading. The warning will disappear once core-updates
> is merged.

Good to know!

Toggle quote (13 lines)
>
> > + (replace 'check
> > + (lambda _
> > + (invoke "pytest" "-m" "not slowtest") #t)))))
>
> To support "guix build --without-tests" and cross-compilation, make this
>
> > + (replace 'check
> > + (lambda* (#:key tests? #:allow-other-keys)
> > + (when tests?
> > + (invoke "pytest" "-m" "not slowtest"))))
>

Thanks for the review! I'm about to post a new version of the patch.

All the best,
Filip
F
F
Filip Lajszczak wrote on 9 May 2021 15:09
[PATCH] gnu: Add python-pythonanywhere.
(address . 48289@debbugs.gnu.org)(name . Filip Lajszczak)(address . filip@lajszczak.dev)
20210509130929.26805-1-filip@lajszczak.dev
* gnu/packages/python-xyz.scm (python-pythonanywhere): New variable.
---
gnu/packages/python-xyz.scm | 50 +++++++++++++++++++++++++++++++++++++
1 file changed, 50 insertions(+)

Toggle diff (70 lines)
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index de7c303b6c..c9468dff19 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -99,6 +99,7 @@
;;; Copyright © 2021 Sharlatan Hellseher <sharlatanus@gmail.com>
;;; Copyright © 2021 Ellis Keny? <me@elken.dev>
;;; Copyright © 2021 LibreMiami <packaging-guix@libremiami.org>
+;;; Copyright © 2021 Filip Lajszczak <filip@lajszczak.dev>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -11455,6 +11456,55 @@ programmatically with command-line parsers like @code{getopt} and
(define-public python2-docopt
(package-with-python2 python-docopt))
+(define-public python-pythonanywhere
+ (package
+ (name "python-pythonanywhere")
+ (version "0.9.8")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/pythonanywhere/helper_scripts")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "0yd0hk9awfk4kc99nn008by8jbz2h709qvzzixjyjhcg6xjmc2zh"))))
+ (build-system python-build-system)
+ (arguments
+ `(#:phases (modify-phases %standard-phases
+ (add-before 'check 'change-home
+ (lambda _
+ (setenv "HOME" "/tmp")))
+ (replace 'check
+ (lambda* (#:key tests? #:allow-other-keys)
+ (when tests?
+ ;; exclude tests marked as slowtest that assume running inside git repository on
+ ;; system with virtualenvwrapper installed.
+ (invoke "pytest" "-m" "not slowtest")))))))
+ (native-inputs
+ `(("python-pytest" ,python-pytest)
+ ("python-psutil" ,python-psutil)
+ ("python-responses" ,python-responses)
+ ("python-pytest-mock" ,python-pytest-mock)))
+ (propagated-inputs
+ `(("python-dateutil" ,python-dateutil)
+ ("python-docopt" ,python-docopt)
+ ("python-packaging" ,python-packaging)
+ ("python-requests" ,python-requests)
+ ("python-schema" ,python-schema)
+ ("python-tabulate" ,python-tabulate)
+ ("python-typer" ,python-typer)))
+ (home-page
+ "https://github.com/pythonanywhere/helper_scripts/")
+ (synopsis
+ "PythonAnywhere helper tools for users")
+ (description
+ "PythonAnywhere helper tools for users. Scripts, cli and python wrapper around API
+that allows to manage web apps and scheduled tasks. Includes single-command deployment
+for Django Girls tutorial.")
+ (license license:expat)))
+
(define-public python-pythondialog
(package
(name "python-pythondialog")
--
2.31.1
F
F
Filip Lajszczak wrote on 18 Dec 2021 00:08
(address . 48289@debbugs.gnu.org)(name . Filip Lajszczak)(address . filip@lajszczak.dev)
20211217230847.9375-1-filip@lajszczak.dev
* gnu/packages/python-xyz.scm (python-pythonanywhere): New variable.
---
gnu/packages/python-xyz.scm | 49 +++++++++++++++++++++++++++++++++++++
1 file changed, 49 insertions(+)

Toggle diff (69 lines)
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 2af4794..2c319a0 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -112,6 +112,7 @@
;;; Copyright © 2021 Sébastien Lerique <sl@eauchat.org>
;;; Copyright © 2021 Raphaël Mélotte <raphael.melotte@mind.be>
;;; Copyright © 2021 ZmnSCPxj <ZmnSCPxj@protonmail.com>
+;;; Copyright © 2021 Filip Lajszczak <filip@lajszczak.dev>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -12406,6 +12407,54 @@ (define-public python-docopt
(define-public python2-docopt
(package-with-python2 python-docopt))
+(define-public python-pythonanywhere
+ (package
+ (name "python-pythonanywhere")
+ (version "0.9.10")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/pythonanywhere/helper_scripts")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "0vzzc1g8pl7cb9yvm3n1j5zlzxf0jd423rzspc2kvpb8yhvydklx"))))
+ (build-system python-build-system)
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ (add-before 'check 'change-home
+ (lambda _
+ (setenv "HOME" "/tmp")))
+ (replace 'check
+ (lambda* (#:key tests? #:allow-other-keys)
+ (when tests?
+ ;; exclude tests marked as slowtest that assume running
+ ;; inside git repository on system with virtualenvwrapper
+ ;; installed.
+ (invoke "pytest" "-m" "not slowtest")))))))
+ (native-inputs
+ (list python-pytest
+ python-psutil
+ python-responses
+ python-pytest-mock))
+ (propagated-inputs
+ (list python-dateutil
+ python-docopt
+ python-packaging
+ python-requests
+ python-schema
+ python-tabulate
+ python-typer))
+ (home-page "https://github.com/pythonanywhere/helper_scripts/")
+ (synopsis "PythonAnywhere helper tools for users")
+ (description "PythonAnywhere helper tools for users. Cli and python wrapper
+around API that allows managing web apps and scheduled tasks. Includes single-command
+deployment for Django Girls tutorial.")
+ (license license:expat)))
+
(define-public python-pythondialog
(package
(name "python-pythondialog")
--
2.34.0
L
L
Ludovic Courtès wrote on 3 Jan 2022 17:34
(name . Filip Lajszczak)(address . filip@lajszczak.dev)(address . 48289-done@debbugs.gnu.org)
877dbghj6e.fsf_-_@gnu.org
Hi Filip,

Filip Lajszczak <filip@lajszczak.dev> skribis:

Toggle quote (2 lines)
> * gnu/packages/python-xyz.scm (python-pythonanywhere): New variable.

Finally applied with the tweaks below (see

Thank you, and thanks for persevering!

Ludo’.
Toggle diff (34 lines)
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 5baddf1abb..01992dc729 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -12532,11 +12532,11 @@ (define-public python-pythonanywhere
(setenv "HOME" "/tmp")))
(replace 'check
(lambda* (#:key tests? #:allow-other-keys)
- (when tests?
- ;; exclude tests marked as slowtest that assume running
- ;; inside git repository on system with virtualenvwrapper
- ;; installed.
- (invoke "pytest" "-m" "not slowtest")))))))
+ (when tests?
+ ;; Exclude tests marked as slowtest that assume running
+ ;; inside Git repository on system with virtualenvwrapper
+ ;; installed.
+ (invoke "pytest" "-m" "not slowtest")))))))
(native-inputs
(list python-pytest
python-psutil
@@ -12552,9 +12552,9 @@ (define-public python-pythonanywhere
python-typer))
(home-page "https://github.com/pythonanywhere/helper_scripts/")
(synopsis "PythonAnywhere helper tools for users")
- (description "PythonAnywhere helper tools for users. Cli and python wrapper
-around API that allows managing web apps and scheduled tasks. Includes single-command
-deployment for Django Girls tutorial.")
+ (description "PythonAnywhere provides a command-line interface and an
+application programming interface that allows managing Web apps and scheduled
+tasks. It includes single-command deployment for the Django Girls tutorial.")
(license license:expat)))
(define-public python-pythondialog
Closed
?
Your comment

This issue is archived.

To comment on this conversation send an email to 48289@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 48289
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch