From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34386) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ekFCL-0005FE-Up for guix-patches@gnu.org; Fri, 09 Feb 2018 15:23:07 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ekFCI-0005iX-Nm for guix-patches@gnu.org; Fri, 09 Feb 2018 15:23:05 -0500 Received: from debbugs.gnu.org ([208.118.235.43]:56047) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ekFCI-0005iP-Gz for guix-patches@gnu.org; Fri, 09 Feb 2018 15:23:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ekFCI-0005Eg-BO for guix-patches@gnu.org; Fri, 09 Feb 2018 15:23:02 -0500 Subject: [bug#30305] [PATCH] gnu: Add python-send2trash. Resent-Message-ID: From: Oleg Pykhalov References: <874ln2yx6i.fsf@gmail.com> <87o9l25eg0.fsf@gnu.org> Date: Fri, 09 Feb 2018 23:21:00 +0300 In-Reply-To: <87o9l25eg0.fsf@gnu.org> ("Ludovic \=\?utf-8\?Q\?Court\=C3\=A8s\=22'\?\= \=\?utf-8\?Q\?s\?\= message of "Tue, 06 Feb 2018 16:24:15 +0100") Message-ID: <87vaf5vrrn.fsf@gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="==-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: Ludovic =?UTF-8?Q?Court=C3=A8s?= Cc: 30305@debbugs.gnu.org --==-=-= Content-Type: multipart/mixed; boundary="=-=-=" --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hello Ludovic, Thank you for review! ludo@gnu.org (Ludovic Court=C3=A8s) writes: > Oleg Pykhalov skribis: =20 >> + (synopsis "Send file to trash") >> + (description >> + "This package provides a Python library to send files to the tra= sh.") =20 > Perhaps in the description you can add more details as to what =E2=80= =9Cthe > trash=E2=80=9D is (is it ~/Trash, or what?). Yes, =E2=80=9C~/Trash=E2=80=9D. > 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. =20 > OK with these changes, thank you! The new synopsis, description and builded with Python 2. --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-gnu-Add-python-send2trash.patch Content-Transfer-Encoding: quoted-printable Content-Description: New synopsis, description and builded with Python 2 From=20b4327af5b9c72c107b9764addd4b409a3a2cb351 Mon Sep 17 00:00:00 2001 From: Oleg Pykhalov Date: Wed, 31 Jan 2018 16:27:33 +0300 Subject: [PATCH] gnu: Add python-send2trash. * gnu/packages/python.scm (python-send2trash): New public variable. =2D-- 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 =2D-- 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)) =20 +(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/arch= ive/" + 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") =2D-=20 2.15.1 --=-=-= Content-Type: text/plain Thanks, Oleg. --=-=-=-- --==-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEEc+OyAXw1EaDPCmAPckbhHGm3lWkFAlp+AqwACgkQckbhHGm3 lWk4PA/+KKZM+q7sHOd5fUsdlqBwJmo96zT+Mm4LjqdBpSYt1a+qjOc++iQ5nfIN NuFigEBNAy5O3nQZM+xBKkj6EevXI2MHHZsQYzbNxMvyWokQzXYT748SCGWm+fPW h5MvD2XbzNtsE4pVW/F2eLzf3bH47p0MTYE8eDysVDqV1mrrgwEGuMDmoziQrnBD 0TfW2exbG8iS/7BcFoxBSrb0E/R49qLUjHWCuN6M9liSn2tqxOoGcbKNuC7zjUJQ JhFkjXNMQx75K/b3JHf4DqdSxNU6XNF1bgygrRHc8ZIUjMroEOAJTinHyHZL9CoI eu1wlitDRagv+Foj6znvr2co1zl0rxs1cTnm6dd4Bg94fZ9Z9EUXXDgn4Xp2QMGL R5rZf3TC6r/Eip4nl+kcdR5vVBKSjL7T7iW/kDn0bXu1hYh59+KCXyG44mO1jmri dg3rbRxc5eBbcHvds9ERiLBigQbryXc34l4qQyozR7wCpGjHmnHhVCfTzfnF1xp7 vCfv5IU45Bb7TU9t3EfWHVkM1Dzdl6XT1ZD12y6jU+hLvjUYVmVgMb0W6VT0Dbjk L8ysXaiAFYYrO+nfPsKwrXB83WRwJDkTXOMONuBqsZ7OKEkdSZGCFdRPOnIX0oGd Nu6tQr1cG4CQoEy40jBfLOiC7a4zVs9fH7FZzBGDvELW4SnhoGQ= =CgjD -----END PGP SIGNATURE----- --==-=-=--