Gentoo Archives: gentoo-commits

From: Virgil Dupras <vdupras@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-python/send2trash/files/, dev-python/send2trash/
Date: Thu, 26 Jul 2018 12:40:01
Message-Id: 1532608757.74160be17bb858f0dc6ea2b2564373b8436b7b90.vdupras@gentoo
1 commit: 74160be17bb858f0dc6ea2b2564373b8436b7b90
2 Author: Virgil Dupras <vdupras <AT> gentoo <DOT> org>
3 AuthorDate: Thu Jul 26 12:39:17 2018 +0000
4 Commit: Virgil Dupras <vdupras <AT> gentoo <DOT> org>
5 CommitDate: Thu Jul 26 12:39:17 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=74160be1
7
8 dev-python/send2trash: bump to 1.5.0
9
10 * Take over maintainership (I upstream this)
11 * EAPI 7
12 * Enable tests
13 * Enable py37 and drop py34
14
15 Package-Manager: Portage-2.3.43, Repoman-2.3.10
16
17 dev-python/send2trash/Manifest | 1 +
18 .../send2trash-1.5.0-fix-broken-tests-on-py2.patch | 29 +++++++++++++++++
19 dev-python/send2trash/metadata.xml | 4 +++
20 dev-python/send2trash/send2trash-1.5.0.ebuild | 36 ++++++++++++++++++++++
21 4 files changed, 70 insertions(+)
22
23 diff --git a/dev-python/send2trash/Manifest b/dev-python/send2trash/Manifest
24 index 5be08e004f3..0fb037b7afb 100644
25 --- a/dev-python/send2trash/Manifest
26 +++ b/dev-python/send2trash/Manifest
27 @@ -1 +1,2 @@
28 DIST Send2Trash-1.3.0.tar.gz 5563 BLAKE2B 54fe34a5f984ded219a3c17f0e06b74a2e5624a8bda8d5723087a918217041bbf6a2b20976b0b4ba71d4a1e08d9ce645b8d5d7fb022ec8e5ed72786496e1ee90 SHA512 d308dd06ef7a11ad7bcb5d9195fb52aa0c0b8e76590ef11b1576d14815501c32c48b96167eb0a325e4f27d0dbf77f41c012a128d30c8f05d9d5ebec9967e21f3
29 +DIST Send2Trash-1.5.0.tar.gz 10892 BLAKE2B 36b51f1859a3b40aa5d9b619491a13da8453ff6615e71423724131a2a88207665d3fbaeef49ecc0ff02b77738d02023c08543d8a759cc0807d74740a8af9b9de SHA512 3c08ef513e5707cd4ac82290b326bb19161222c7a84b8ffd494789ba9858929241f55ea55482947af464c14e32fea27bd92cd762a32a1d55e2daf2e21fd63172
30
31 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
32 new file mode 100644
33 index 00000000000..3f2a64ca2a2
34 --- /dev/null
35 +++ b/dev-python/send2trash/files/send2trash-1.5.0-fix-broken-tests-on-py2.patch
36 @@ -0,0 +1,29 @@
37 +From 74352462f5df2cb5708b96458b81afef3070c800 Mon Sep 17 00:00:00 2001
38 +From: Virgil Dupras <hsoft@×××××××××.net>
39 +Date: Thu, 26 Jul 2018 08:30:39 -0400
40 +Subject: [PATCH] Fix broken tests on py2
41 +
42 +---
43 + tests/test_plat_other.py | 6 +++++-
44 + 1 file changed, 5 insertions(+), 1 deletion(-)
45 +
46 +diff --git a/tests/test_plat_other.py b/tests/test_plat_other.py
47 +index b94295d..ae4f391 100644
48 +--- a/tests/test_plat_other.py
49 ++++ b/tests/test_plat_other.py
50 +@@ -6,7 +6,11 @@ from os import path as op
51 + import send2trash.plat_other
52 + from send2trash.plat_other import send2trash as s2t
53 + from send2trash.compat import PY3
54 +-from configparser import ConfigParser
55 ++try:
56 ++ from configparser import ConfigParser
57 ++except ImportError:
58 ++ # py2
59 ++ from ConfigParser import ConfigParser
60 + from tempfile import mkdtemp, NamedTemporaryFile, mktemp
61 + import shutil
62 + import stat
63 +--
64 +2.16.4
65 +
66
67 diff --git a/dev-python/send2trash/metadata.xml b/dev-python/send2trash/metadata.xml
68 index 9dd52975619..0267c38bf91 100644
69 --- a/dev-python/send2trash/metadata.xml
70 +++ b/dev-python/send2trash/metadata.xml
71 @@ -1,6 +1,10 @@
72 <?xml version="1.0" encoding="UTF-8"?>
73 <!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
74 <pkgmetadata>
75 + <maintainer type="person">
76 + <email>vdupras@g.o</email>
77 + <name>Virgil Dupras</name>
78 + </maintainer>
79 <maintainer type="project">
80 <email>python@g.o</email>
81 <name>Python</name>
82
83 diff --git a/dev-python/send2trash/send2trash-1.5.0.ebuild b/dev-python/send2trash/send2trash-1.5.0.ebuild
84 new file mode 100644
85 index 00000000000..8d102d20e3e
86 --- /dev/null
87 +++ b/dev-python/send2trash/send2trash-1.5.0.ebuild
88 @@ -0,0 +1,36 @@
89 +# Copyright 1999-2018 Gentoo Foundation
90 +# Distributed under the terms of the GNU General Public License v2
91 +
92 +EAPI=7
93 +
94 +PYTHON_COMPAT=( python{2_7,3_{5,6,7}} pypy )
95 +
96 +inherit distutils-r1
97 +
98 +MY_PN="Send2Trash"
99 +MY_P="${MY_PN}-${PV}"
100 +
101 +DESCRIPTION="Sends files to the Trash (or Recycle Bin)"
102 +HOMEPAGE="
103 + https://pypi.org/project/Send2Trash/
104 + https://github.com/hsoft/send2trash"
105 +SRC_URI="mirror://pypi/${MY_PN:0:1}/${MY_PN}/${MY_P}.tar.gz"
106 +
107 +SLOT="0"
108 +LICENSE="BSD"
109 +KEYWORDS="~amd64 ~x86"
110 +IUSE=""
111 +
112 +RDEPEND=""
113 +DEPEND="${RDEPEND}
114 + dev-python/setuptools[${PYTHON_USEDEP}]"
115 +
116 +S="${WORKDIR}"/${MY_P}
117 +
118 +PATCHES=(
119 + "${FILESDIR}/${P}-fix-broken-tests-on-py2.patch"
120 +)
121 +
122 +python_test() {
123 + ${EPYTHON} setup.py test
124 +}