dev-python/send2trash: bump to 1.5.0
authorVirgil Dupras <vdupras@gentoo.org>
Thu, 26 Jul 2018 12:39:17 +0000 (08:39 -0400)
committerVirgil Dupras <vdupras@gentoo.org>
Thu, 26 Jul 2018 12:39:17 +0000 (08:39 -0400)
* Take over maintainership (I upstream this)
* EAPI 7
* Enable tests
* Enable py37 and drop py34

Package-Manager: Portage-2.3.43, Repoman-2.3.10

dev-python/send2trash/Manifest
dev-python/send2trash/files/send2trash-1.5.0-fix-broken-tests-on-py2.patch [new file with mode: 0644]
dev-python/send2trash/metadata.xml
dev-python/send2trash/send2trash-1.5.0.ebuild [new file with mode: 0644]

index 5be08e004f3c760d754c3490af4eb93678e7ceea..0fb037b7afb967df4f9126639f8783f0649c4359 100644 (file)
@@ -1 +1,2 @@
 DIST Send2Trash-1.3.0.tar.gz 5563 BLAKE2B 54fe34a5f984ded219a3c17f0e06b74a2e5624a8bda8d5723087a918217041bbf6a2b20976b0b4ba71d4a1e08d9ce645b8d5d7fb022ec8e5ed72786496e1ee90 SHA512 d308dd06ef7a11ad7bcb5d9195fb52aa0c0b8e76590ef11b1576d14815501c32c48b96167eb0a325e4f27d0dbf77f41c012a128d30c8f05d9d5ebec9967e21f3
+DIST Send2Trash-1.5.0.tar.gz 10892 BLAKE2B 36b51f1859a3b40aa5d9b619491a13da8453ff6615e71423724131a2a88207665d3fbaeef49ecc0ff02b77738d02023c08543d8a759cc0807d74740a8af9b9de SHA512 3c08ef513e5707cd4ac82290b326bb19161222c7a84b8ffd494789ba9858929241f55ea55482947af464c14e32fea27bd92cd762a32a1d55e2daf2e21fd63172
diff --git a/dev-python/send2trash/files/send2trash-1.5.0-fix-broken-tests-on-py2.patch b/dev-python/send2trash/files/send2trash-1.5.0-fix-broken-tests-on-py2.patch
new file mode 100644 (file)
index 0000000..3f2a64c
--- /dev/null
@@ -0,0 +1,29 @@
+From 74352462f5df2cb5708b96458b81afef3070c800 Mon Sep 17 00:00:00 2001
+From: Virgil Dupras <hsoft@hardcoded.net>
+Date: Thu, 26 Jul 2018 08:30:39 -0400
+Subject: [PATCH] Fix broken tests on py2
+
+---
+ tests/test_plat_other.py | 6 +++++-
+ 1 file changed, 5 insertions(+), 1 deletion(-)
+
+diff --git a/tests/test_plat_other.py b/tests/test_plat_other.py
+index b94295d..ae4f391 100644
+--- a/tests/test_plat_other.py
++++ b/tests/test_plat_other.py
+@@ -6,7 +6,11 @@ from os import path as op
+ import send2trash.plat_other
+ from send2trash.plat_other import send2trash as s2t
+ from send2trash.compat import PY3
+-from configparser import ConfigParser
++try:
++    from configparser import ConfigParser
++except ImportError:
++    # py2
++    from ConfigParser import ConfigParser
+ from tempfile import mkdtemp, NamedTemporaryFile, mktemp
+ import shutil
+ import stat
+-- 
+2.16.4
+
index 9dd529756191b3509f76303eaadba6c8a7319d6a..0267c38bf914be1ec145536f192dec593eb39e09 100644 (file)
@@ -1,6 +1,10 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
 <pkgmetadata>
+  <maintainer type="person">
+    <email>vdupras@gentoo.org</email>
+    <name>Virgil Dupras</name>
+  </maintainer>
   <maintainer type="project">
     <email>python@gentoo.org</email>
     <name>Python</name>
diff --git a/dev-python/send2trash/send2trash-1.5.0.ebuild b/dev-python/send2trash/send2trash-1.5.0.ebuild
new file mode 100644 (file)
index 0000000..8d102d2
--- /dev/null
@@ -0,0 +1,36 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python{2_7,3_{5,6,7}} pypy )
+
+inherit distutils-r1
+
+MY_PN="Send2Trash"
+MY_P="${MY_PN}-${PV}"
+
+DESCRIPTION="Sends files to the Trash (or Recycle Bin)"
+HOMEPAGE="
+       https://pypi.org/project/Send2Trash/
+       https://github.com/hsoft/send2trash"
+SRC_URI="mirror://pypi/${MY_PN:0:1}/${MY_PN}/${MY_P}.tar.gz"
+
+SLOT="0"
+LICENSE="BSD"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+RDEPEND=""
+DEPEND="${RDEPEND}
+       dev-python/setuptools[${PYTHON_USEDEP}]"
+
+S="${WORKDIR}"/${MY_P}
+
+PATCHES=(
+       "${FILESDIR}/${P}-fix-broken-tests-on-py2.patch"
+)
+
+python_test() {
+       ${EPYTHON} setup.py test
+}