* [bug#30305] [PATCH] gnu: Add python-send2trash.
@ 2018-01-31 13:28 Oleg Pykhalov
2018-02-06 15:24 ` Ludovic Courtès
2018-06-22 19:47 ` [bug#30305] " Gábor Boskovits
0 siblings, 2 replies; 7+ messages in thread
From: Oleg Pykhalov @ 2018-01-31 13:28 UTC (permalink / raw)
To: 30305
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: [PATCH] gnu: Add python-send2trash. --]
[-- Type: text/x-patch, Size: 1708 bytes --]
From 0e5058622c1291059fbf85b5949fb49cf0682dfd Mon Sep 17 00:00:00 2001
From: Oleg Pykhalov <go.wigust@gmail.com>
Date: Wed, 31 Jan 2018 16:27:33 +0300
Subject: [PATCH] gnu: Add python-send2trash.
* gnu/packages/python.scm (python-send2trash): New public variable.
---
gnu/packages/python.scm | 27 +++++++++++++++++++++++++++
1 file changed, 27 insertions(+)
diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
index 94551da33..67c9a7665 100644
--- a/gnu/packages/python.scm
+++ b/gnu/packages/python.scm
@@ -12395,6 +12395,33 @@ and works only with Python 2 and NumPy < 1.9.")
(define-public python2-phonenumbers
(package-with-python2 python-phonenumbers))
+(define-public python-send2trash
+ (package
+ (name "python-send2trash")
+ (version "1.4.2")
+ (source
+ (origin (method url-fetch)
+ ;; Source tarball on PyPI doesn't include tests.
+ (uri (string-append "https://github.com/hsoft/send2trash/archive/"
+ version ".tar.gz"))
+ (sha256
+ (base32
+ "0ffyhwjyx61slkdy38iwjc4gmj7fj9gs2q58f075gwvq630pzm9z"))))
+ (build-system python-build-system)
+ (arguments
+ '(#:phases
+ (modify-phases %standard-phases
+ (add-before 'check 'pre-check
+ (lambda _
+ (mkdir-p "/tmp/foo")
+ (setenv "HOME" "/tmp/foo")
+ #t)))))
+ (home-page "https://github.com/hsoft/send2trash")
+ (synopsis "Send file to trash")
+ (description
+ "This package provides a Python library to send files to trash.")
+ (license license:bsd-3)))
+
(define-public python-yapf
(package
(name "python-yapf")
--
2.15.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [bug#30305] [PATCH] gnu: Add python-send2trash.
2018-01-31 13:28 [bug#30305] [PATCH] gnu: Add python-send2trash Oleg Pykhalov
@ 2018-02-06 15:24 ` Ludovic Courtès
2018-02-09 20:21 ` Oleg Pykhalov
2018-06-22 19:47 ` [bug#30305] " Gábor Boskovits
1 sibling, 1 reply; 7+ messages in thread
From: Ludovic Courtès @ 2018-02-06 15:24 UTC (permalink / raw)
To: Oleg Pykhalov; +Cc: 30305
Oleg Pykhalov <go.wigust@gmail.com> skribis:
>>From 0e5058622c1291059fbf85b5949fb49cf0682dfd Mon Sep 17 00:00:00 2001
> From: Oleg Pykhalov <go.wigust@gmail.com>
> Date: Wed, 31 Jan 2018 16:27:33 +0300
> Subject: [PATCH] gnu: Add python-send2trash.
>
> * gnu/packages/python.scm (python-send2trash): New public variable.
[...]
> + (synopsis "Send file to trash")
> + (description
> + "This package provides a Python library to send files to trash.")
s/to trash/to the trash/
Perhaps in the description you can add more details as to what “the
trash” is (is it ~/Trash, or what?).
Is there a reason for not providing a Python 2.x variant? If there is
one, please add a comment.
OK with these changes, thank you!
Ludo’.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [bug#30305] [PATCH] gnu: Add python-send2trash.
2018-02-06 15:24 ` Ludovic Courtès
@ 2018-02-09 20:21 ` Oleg Pykhalov
2018-02-09 22:03 ` Ludovic Courtès
0 siblings, 1 reply; 7+ messages in thread
From: Oleg Pykhalov @ 2018-02-09 20:21 UTC (permalink / raw)
To: Ludovic Courtès; +Cc: 30305
[-- Attachment #1.1: Type: text/plain, Size: 753 bytes --]
Hello Ludovic,
Thank you for review!
ludo@gnu.org (Ludovic Courtès) writes:
> Oleg Pykhalov <go.wigust@gmail.com> skribis:
>> + (synopsis "Send file to trash")
>> + (description
>> + "This package provides a Python library to send files to the trash.")
> Perhaps in the description you can add more details as to what “the
> trash” is (is it ~/Trash, or what?).
Yes, “~/Trash”.
> Is there a reason for not providing a Python 2.x variant? If there is
> one, please add a comment.
Yes, I had an issue to build it with Python 2 because tests failed.
Solved in the new attached patch.
> OK with these changes, thank you!
The new synopsis, description and builded with Python 2.
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.2: New synopsis, description and builded with Python 2 --]
[-- Type: text/x-patch, Size: 2353 bytes --]
From b4327af5b9c72c107b9764addd4b409a3a2cb351 Mon Sep 17 00:00:00 2001
From: Oleg Pykhalov <go.wigust@gmail.com>
Date: Wed, 31 Jan 2018 16:27:33 +0300
Subject: [PATCH] gnu: Add python-send2trash.
* gnu/packages/python.scm (python-send2trash): New public variable.
---
gnu/packages/python.scm | 41 +++++++++++++++++++++++++++++++++++++++++
1 file changed, 41 insertions(+)
diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
index 777590b58..85547ac5a 100644
--- a/gnu/packages/python.scm
+++ b/gnu/packages/python.scm
@@ -12394,6 +12394,47 @@ and works only with Python 2 and NumPy < 1.9.")
(define-public python2-phonenumbers
(package-with-python2 python-phonenumbers))
+(define-public python-send2trash
+ (package
+ (name "python-send2trash")
+ (version "1.4.2")
+ (source
+ (origin (method url-fetch)
+ ;; Source tarball on PyPI doesn't include tests.
+ (uri (string-append "https://github.com/hsoft/send2trash/archive/"
+ version ".tar.gz"))
+ (file-name (string-append name "-" version ".tar.gz"))
+ (sha256
+ (base32
+ "0ffyhwjyx61slkdy38iwjc4gmj7fj9gs2q58f075gwvq630pzm9z"))))
+ (build-system python-build-system)
+ (arguments
+ '(#:phases
+ (modify-phases %standard-phases
+ (add-before 'check 'pre-check
+ (lambda _
+ (mkdir-p "/tmp/foo")
+ (setenv "HOME" "/tmp/foo")
+ #t)))))
+ (home-page "https://github.com/hsoft/send2trash")
+ (synopsis "Send files to the user's Trash directory")
+ (description "This package provides a Python library to send files to the
+user's Trash directory.")
+ (license license:bsd-3)))
+
+(define-public python2-send2trash
+ (package
+ (inherit (package-with-python2 python-send2trash))
+ (arguments
+ (substitute-keyword-arguments (package-arguments python-send2trash)
+ ((#:phases phases)
+ `(modify-phases ,phases
+ (add-before 'check 'setenv
+ (lambda _
+ (setenv "PYTHONPATH"
+ (string-append (getcwd) ":" (getenv "PYTHONPATH")))
+ #t))))))))
+
(define-public python-yapf
(package
(name "python-yapf")
--
2.15.1
[-- Attachment #1.3: Type: text/plain, Size: 15 bytes --]
Thanks,
Oleg.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [bug#30305] [PATCH] gnu: Add python-send2trash.
2018-02-09 20:21 ` Oleg Pykhalov
@ 2018-02-09 22:03 ` Ludovic Courtès
2018-02-10 8:46 ` Oleg Pykhalov
0 siblings, 1 reply; 7+ messages in thread
From: Ludovic Courtès @ 2018-02-09 22:03 UTC (permalink / raw)
To: Oleg Pykhalov; +Cc: 30305
Oleg Pykhalov <go.wigust@gmail.com> skribis:
> From b4327af5b9c72c107b9764addd4b409a3a2cb351 Mon Sep 17 00:00:00 2001
> From: Oleg Pykhalov <go.wigust@gmail.com>
> Date: Wed, 31 Jan 2018 16:27:33 +0300
> Subject: [PATCH] gnu: Add python-send2trash.
>
> * gnu/packages/python.scm (python-send2trash): New public variable.
+ python2-send2trash.
> + (synopsis "Send files to the user's Trash directory")
s/Trash/trash/
> + (description "This package provides a Python library to send files to the
> +user's Trash directory.")
s/Trash/@file{~/Trash}/
You’d also need to set the ‘python2-variant’ property here because your
python2 variant is not a direct translation (see other packages in this
file as an example).
OK with these changes.
Thanks,
Ludo’.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [bug#30305] [PATCH] gnu: Add python-send2trash.
2018-02-09 22:03 ` Ludovic Courtès
@ 2018-02-10 8:46 ` Oleg Pykhalov
0 siblings, 0 replies; 7+ messages in thread
From: Oleg Pykhalov @ 2018-02-10 8:46 UTC (permalink / raw)
To: Ludovic Courtès; +Cc: 30305
[-- Attachment #1: Type: text/plain, Size: 1033 bytes --]
ludo@gnu.org (Ludovic Courtès) writes:
>> + (description "This package provides a Python library to send files to the
>> +user's Trash directory.")
>
> s/Trash/@file{~/Trash}/
Maybe “@file{@var{XDG_DATA_HOME}/Trash}”? Could be not a “~”, because
the library uses “XDG_DATA_HOME” variable. From the source tarball:
--8<---------------cut here---------------start------------->8---
./send2trash/plat_other.py:49:HOMETRASH_B = op.join(XDG_DATA_HOME, b'Trash')
--8<---------------cut here---------------end--------------->8---
> You’d also need to set the ‘python2-variant’ property here because your
> python2 variant is not a direct translation (see other packages in this
> file as an example).
--8<---------------cut here---------------start------------->8---
(define-public python2-send2trash
(package
…
(properties `((python2-variant . ,(delay python-send2trash))))))
--8<---------------cut here---------------end--------------->8---
Thanks,
Oleg.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* [bug#30305] gnu: Add python-send2trash.
2018-01-31 13:28 [bug#30305] [PATCH] gnu: Add python-send2trash Oleg Pykhalov
2018-02-06 15:24 ` Ludovic Courtès
@ 2018-06-22 19:47 ` Gábor Boskovits
2018-06-23 16:52 ` bug#30305: " Oleg Pykhalov
1 sibling, 1 reply; 7+ messages in thread
From: Gábor Boskovits @ 2018-06-22 19:47 UTC (permalink / raw)
To: 30305
[-- Attachment #1: Type: text/plain, Size: 139 bytes --]
This look like a good candidate for inclusion to guix 0.15.0. Could you
send an updated patch, or push it with the proposed modifications?
[-- Attachment #2: Type: text/html, Size: 160 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* bug#30305: gnu: Add python-send2trash.
2018-06-22 19:47 ` [bug#30305] " Gábor Boskovits
@ 2018-06-23 16:52 ` Oleg Pykhalov
0 siblings, 0 replies; 7+ messages in thread
From: Oleg Pykhalov @ 2018-06-23 16:52 UTC (permalink / raw)
To: Gábor Boskovits; +Cc: 30305, 30305-done
[-- Attachment #1: Type: text/plain, Size: 284 bytes --]
Hello Gábor,
Gábor Boskovits <boskovits@gmail.com> writes:
> This look like a good candidate for inclusion to guix 0.15.0. Could you
> send an updated patch, or push it with the proposed modifications?
Pushed as 02e2d18297c9352d5f12abe128a82e579d9be278
Thanks,
Oleg.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2018-06-23 16:53 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-01-31 13:28 [bug#30305] [PATCH] gnu: Add python-send2trash Oleg Pykhalov
2018-02-06 15:24 ` Ludovic Courtès
2018-02-09 20:21 ` Oleg Pykhalov
2018-02-09 22:03 ` Ludovic Courtès
2018-02-10 8:46 ` Oleg Pykhalov
2018-06-22 19:47 ` [bug#30305] " Gábor Boskovits
2018-06-23 16:52 ` bug#30305: " Oleg Pykhalov
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.