* [gentoo-commits] repo/proj/guru:dev commit in: dev-python/tekore/files/, dev-python/tekore/
@ 2020-01-21 14:49 Andrew Ammerlaan
0 siblings, 0 replies; 3+ messages in thread
From: Andrew Ammerlaan @ 2020-01-21 14:49 UTC (permalink / raw
To: gentoo-commits
commit: bfcaa87979b99f0fa3b05599abd1bc75abad41ae
Author: Andrew Ammerlaan <andrewammerlaan <AT> riseup <DOT> net>
AuthorDate: Tue Jan 21 14:47:16 2020 +0000
Commit: Andrew Ammerlaan <andrewammerlaan <AT> riseup <DOT> net>
CommitDate: Tue Jan 21 14:47:16 2020 +0000
URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=bfcaa879
dev-python/tekore: Spotify Web API client
Package-Manager: Portage-2.3.84, Repoman-2.3.20
Signed-off-by: Andrew Ammerlaan <andrewammerlaan <AT> riseup.net>
dev-python/tekore/Manifest | 1 +
.../tekore-1.0.1-skip-sender_type-tests.patch | 75 ++++++++++++++++++++++
dev-python/tekore/metadata.xml | 13 ++++
dev-python/tekore/tekore-1.0.1.ebuild | 30 +++++++++
4 files changed, 119 insertions(+)
diff --git a/dev-python/tekore/Manifest b/dev-python/tekore/Manifest
new file mode 100644
index 0000000..ace9472
--- /dev/null
+++ b/dev-python/tekore/Manifest
@@ -0,0 +1 @@
+DIST tekore-1.0.1.tar.gz 130077 BLAKE2B 21550c7545125248a0f8ac61eb1c97e80b299de38940ec36b20dbc73fc8224cc703955b0e6aefac1fdd98d59a55e67d24995dcbbeb17f8670515d7acea86be16 SHA512 fb02005990daff11b0c3d7881ad2842578a35e0e62fec5130506d4df48311c2cceae9e7d3a322ad8058a058fdc92bac06533b958be2b57a9d8e85e16c39ef062
diff --git a/dev-python/tekore/files/tekore-1.0.1-skip-sender_type-tests.patch b/dev-python/tekore/files/tekore-1.0.1-skip-sender_type-tests.patch
new file mode 100644
index 0000000..3ab0043
--- /dev/null
+++ b/dev-python/tekore/files/tekore-1.0.1-skip-sender_type-tests.patch
@@ -0,0 +1,75 @@
+diff --git a/tests/sender.py b/tests/sender.py
+index 0f9334b..5c5966f 100644
+--- a/tests/sender.py
++++ b/tests/sender.py
+@@ -55,22 +55,22 @@ class TestSingletonSender(unittest.TestCase):
+ )
+
+
+-def test_request_prepared(sender_type):
+- mock = MockSessionFactory()
+- with patch('tekore.sender.Session', mock):
+- s = sender_type()
+- r = Request()
+- s.send(r)
+- mock.instances[0].prepare_request.assert_called_with(r)
+-
+-
+-def test_keywords_passed_to_session(sender_type):
+- mock = MockSessionFactory()
+- kwargs = dict(k1='k1', k2='k2')
+- with patch('tekore.sender.Session', mock):
+- s = sender_type(**kwargs)
+- s.send(Request())
+- mock.instances[0].send.assert_called_with(mock.prepare_return, **kwargs)
++# def test_request_prepared(sender_type):
++# mock = MockSessionFactory()
++# with patch('tekore.sender.Session', mock):
++# s = sender_type()
++# r = Request()
++# s.send(r)
++# mock.instances[0].prepare_request.assert_called_with(r)
++
++
++# def test_keywords_passed_to_session(sender_type):
++# mock = MockSessionFactory()
++# kwargs = dict(k1='k1', k2='k2')
++# with patch('tekore.sender.Session', mock):
++# s = sender_type(**kwargs)
++# s.send(Request())
++# mock.instances[0].send.assert_called_with(mock.prepare_return, **kwargs)
+
+
+ class TestPersistentSender(unittest.TestCase):
+@@ -88,11 +88,11 @@ class TestPersistentSender(unittest.TestCase):
+ s2 = PersistentSender()
+ self.assertTrue(s1.session is not s2.session)
+
+- def test_request_prepared(self):
+- test_request_prepared(PersistentSender)
++ # def test_request_prepared(self):
++ # test_request_prepared(PersistentSender)
+
+- def test_keywords_passed_to_session(self):
+- test_keywords_passed_to_session(PersistentSender)
++ # def test_keywords_passed_to_session(self):
++ # test_keywords_passed_to_session(PersistentSender)
+
+
+ class TestTransientSender(unittest.TestCase):
+@@ -104,11 +104,11 @@ class TestTransientSender(unittest.TestCase):
+ s.send(Request())
+ self.assertEqual(len(mock.instances), 2)
+
+- def test_request_prepared(self):
+- test_request_prepared(TransientSender)
++ # def test_request_prepared(self):
++ # test_request_prepared(TransientSender)
+
+- def test_keywords_passed_to_session(self):
+- test_keywords_passed_to_session(TransientSender)
++ # def test_keywords_passed_to_session(self):
++ # test_keywords_passed_to_session(TransientSender)
+
+
+ def ok_response() -> MagicMock:
diff --git a/dev-python/tekore/metadata.xml b/dev-python/tekore/metadata.xml
new file mode 100644
index 0000000..dd0bd9c
--- /dev/null
+++ b/dev-python/tekore/metadata.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+
+<pkgmetadata>
+ <maintainer type="person">
+ <email>andrewammerlaan@riseup.net</email>
+ <name>Andrew Ammerlaan</name>
+ </maintainer>
+ <maintainer type="project">
+ <email>proxy-maint@gentoo.org</email>
+ <name>Proxy Maintainers</name>
+ </maintainer>
+</pkgmetadata>
diff --git a/dev-python/tekore/tekore-1.0.1.ebuild b/dev-python/tekore/tekore-1.0.1.ebuild
new file mode 100644
index 0000000..64c1c55
--- /dev/null
+++ b/dev-python/tekore/tekore-1.0.1.ebuild
@@ -0,0 +1,30 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python3_{6,7,8} )
+
+inherit distutils-r1
+
+DESCRIPTION="Spotify Web API client"
+HOMEPAGE="https://tekore.readthedocs.io
+ https://github.com/felix-hilden/tekore"
+SRC_URI="https://github.com/felix-hilden/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="MIT"
+KEYWORDS="~amd64 ~x86 "
+SLOT="0"
+
+RDEPEND="dev-python/requests[${PYTHON_USEDEP}]"
+
+PATCHES="${FILESDIR}/${P}-skip-sender_type-tests.patch"
+
+DOCS="readme.rst"
+
+distutils_enable_sphinx docs dev-python/sphinx_rtd_theme dev-python/sphinx-autodoc-typehints
+distutils_enable_tests pytest
+
+python_test() {
+ pytest -vv tests/* || die "Tests fail with ${EPYTHON}"
+}
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [gentoo-commits] repo/proj/guru:dev commit in: dev-python/tekore/files/, dev-python/tekore/
@ 2020-02-03 18:07 Andrew Ammerlaan
0 siblings, 0 replies; 3+ messages in thread
From: Andrew Ammerlaan @ 2020-02-03 18:07 UTC (permalink / raw
To: gentoo-commits
commit: 47994475c1fe4edf60b77105c2b8c6f12f8ff615
Author: Andrew Ammerlaan <andrewammerlaan <AT> riseup <DOT> net>
AuthorDate: Mon Feb 3 17:56:14 2020 +0000
Commit: Andrew Ammerlaan <andrewammerlaan <AT> riseup <DOT> net>
CommitDate: Mon Feb 3 17:56:14 2020 +0000
URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=47994475
dev-python/tekore: Version bump 1.1.0
Package-Manager: Portage-2.3.86, Repoman-2.3.20
Signed-off-by: Andrew Ammerlaan <andrewammerlaan <AT> riseup.net>
dev-python/tekore/Manifest | 2 +-
.../tekore-1.0.1-skip-sender_type-tests.patch | 75 ----------------------
dev-python/tekore/metadata.xml | 4 --
.../{tekore-1.0.1.ebuild => tekore-1.1.0.ebuild} | 19 ++++--
4 files changed, 14 insertions(+), 86 deletions(-)
diff --git a/dev-python/tekore/Manifest b/dev-python/tekore/Manifest
index ace9472..b4bc819 100644
--- a/dev-python/tekore/Manifest
+++ b/dev-python/tekore/Manifest
@@ -1 +1 @@
-DIST tekore-1.0.1.tar.gz 130077 BLAKE2B 21550c7545125248a0f8ac61eb1c97e80b299de38940ec36b20dbc73fc8224cc703955b0e6aefac1fdd98d59a55e67d24995dcbbeb17f8670515d7acea86be16 SHA512 fb02005990daff11b0c3d7881ad2842578a35e0e62fec5130506d4df48311c2cceae9e7d3a322ad8058a058fdc92bac06533b958be2b57a9d8e85e16c39ef062
+DIST tekore-1.1.0.tar.gz 138871 BLAKE2B 5580c502129ed1fd9c7a7f6a860d918a0a46f6ac51a3f6bef5f08c1e036756684d11c670e55343c27ff3dd7a40fa45b2307a9a27b594558525b7d4a41617908c SHA512 968315f3818803f076798a88f791ca10a4a118850ee730d449e2db8e5d5aca00293f8d8483a4d9edb9802b103aa6328a7514f58f4959bb0a551ed11b065ece87
diff --git a/dev-python/tekore/files/tekore-1.0.1-skip-sender_type-tests.patch b/dev-python/tekore/files/tekore-1.0.1-skip-sender_type-tests.patch
deleted file mode 100644
index 3ab0043..0000000
--- a/dev-python/tekore/files/tekore-1.0.1-skip-sender_type-tests.patch
+++ /dev/null
@@ -1,75 +0,0 @@
-diff --git a/tests/sender.py b/tests/sender.py
-index 0f9334b..5c5966f 100644
---- a/tests/sender.py
-+++ b/tests/sender.py
-@@ -55,22 +55,22 @@ class TestSingletonSender(unittest.TestCase):
- )
-
-
--def test_request_prepared(sender_type):
-- mock = MockSessionFactory()
-- with patch('tekore.sender.Session', mock):
-- s = sender_type()
-- r = Request()
-- s.send(r)
-- mock.instances[0].prepare_request.assert_called_with(r)
--
--
--def test_keywords_passed_to_session(sender_type):
-- mock = MockSessionFactory()
-- kwargs = dict(k1='k1', k2='k2')
-- with patch('tekore.sender.Session', mock):
-- s = sender_type(**kwargs)
-- s.send(Request())
-- mock.instances[0].send.assert_called_with(mock.prepare_return, **kwargs)
-+# def test_request_prepared(sender_type):
-+# mock = MockSessionFactory()
-+# with patch('tekore.sender.Session', mock):
-+# s = sender_type()
-+# r = Request()
-+# s.send(r)
-+# mock.instances[0].prepare_request.assert_called_with(r)
-+
-+
-+# def test_keywords_passed_to_session(sender_type):
-+# mock = MockSessionFactory()
-+# kwargs = dict(k1='k1', k2='k2')
-+# with patch('tekore.sender.Session', mock):
-+# s = sender_type(**kwargs)
-+# s.send(Request())
-+# mock.instances[0].send.assert_called_with(mock.prepare_return, **kwargs)
-
-
- class TestPersistentSender(unittest.TestCase):
-@@ -88,11 +88,11 @@ class TestPersistentSender(unittest.TestCase):
- s2 = PersistentSender()
- self.assertTrue(s1.session is not s2.session)
-
-- def test_request_prepared(self):
-- test_request_prepared(PersistentSender)
-+ # def test_request_prepared(self):
-+ # test_request_prepared(PersistentSender)
-
-- def test_keywords_passed_to_session(self):
-- test_keywords_passed_to_session(PersistentSender)
-+ # def test_keywords_passed_to_session(self):
-+ # test_keywords_passed_to_session(PersistentSender)
-
-
- class TestTransientSender(unittest.TestCase):
-@@ -104,11 +104,11 @@ class TestTransientSender(unittest.TestCase):
- s.send(Request())
- self.assertEqual(len(mock.instances), 2)
-
-- def test_request_prepared(self):
-- test_request_prepared(TransientSender)
-+ # def test_request_prepared(self):
-+ # test_request_prepared(TransientSender)
-
-- def test_keywords_passed_to_session(self):
-- test_keywords_passed_to_session(TransientSender)
-+ # def test_keywords_passed_to_session(self):
-+ # test_keywords_passed_to_session(TransientSender)
-
-
- def ok_response() -> MagicMock:
diff --git a/dev-python/tekore/metadata.xml b/dev-python/tekore/metadata.xml
index dd0bd9c..628ab20 100644
--- a/dev-python/tekore/metadata.xml
+++ b/dev-python/tekore/metadata.xml
@@ -6,8 +6,4 @@
<email>andrewammerlaan@riseup.net</email>
<name>Andrew Ammerlaan</name>
</maintainer>
- <maintainer type="project">
- <email>proxy-maint@gentoo.org</email>
- <name>Proxy Maintainers</name>
- </maintainer>
</pkgmetadata>
diff --git a/dev-python/tekore/tekore-1.0.1.ebuild b/dev-python/tekore/tekore-1.1.0.ebuild
similarity index 51%
rename from dev-python/tekore/tekore-1.0.1.ebuild
rename to dev-python/tekore/tekore-1.1.0.ebuild
index 64c1c55..f356ed9 100644
--- a/dev-python/tekore/tekore-1.0.1.ebuild
+++ b/dev-python/tekore/tekore-1.1.0.ebuild
@@ -3,7 +3,7 @@
EAPI=7
-PYTHON_COMPAT=( python3_{6,7,8} )
+PYTHON_COMPAT=( python3_7 )
inherit distutils-r1
@@ -13,18 +13,25 @@ HOMEPAGE="https://tekore.readthedocs.io
SRC_URI="https://github.com/felix-hilden/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
LICENSE="MIT"
-KEYWORDS="~amd64 ~x86 "
+KEYWORDS="~amd64 ~x86"
SLOT="0"
-RDEPEND="dev-python/requests[${PYTHON_USEDEP}]"
-
-PATCHES="${FILESDIR}/${P}-skip-sender_type-tests.patch"
+RDEPEND="dev-python/requests[${PYTHON_USEDEP}]
+ dev-python/httpx[${PYTHON_USEDEP}]"
DOCS="readme.rst"
-distutils_enable_sphinx docs dev-python/sphinx_rtd_theme dev-python/sphinx-autodoc-typehints
+distutils_enable_sphinx docs dev-python/sphinx_rtd_theme[${PYTHON_USEDEP}] dev-python/sphinx-autodoc-typehints[${PYTHON_USEDEP}]
distutils_enable_tests pytest
+python_prepare_all() {
+ # docs fail: AttributeError: 'PosixPath' object has no attribute 'rstrip'
+ sed -i -e 's:sys.path.insert(0, _root):#&:' \
+ docs/conf.py || die
+
+ distutils-r1_python_prepare_all
+}
+
python_test() {
pytest -vv tests/* || die "Tests fail with ${EPYTHON}"
}
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [gentoo-commits] repo/proj/guru:dev commit in: dev-python/tekore/files/, dev-python/tekore/
2020-09-04 11:01 [gentoo-commits] repo/proj/guru:master commit in: dev-python/tekore/, dev-python/tekore/files/ Andrew Ammerlaan
@ 2020-09-04 11:01 ` Andrew Ammerlaan
0 siblings, 0 replies; 3+ messages in thread
From: Andrew Ammerlaan @ 2020-09-04 11:01 UTC (permalink / raw
To: gentoo-commits
commit: 2b23ff4b18e01c5daef416d0731c4ee2bcaaae96
Author: Andrew Ammerlaan <andrewammerlaan <AT> riseup <DOT> net>
AuthorDate: Fri Sep 4 11:01:07 2020 +0000
Commit: Andrew Ammerlaan <andrewammerlaan <AT> riseup <DOT> net>
CommitDate: Fri Sep 4 11:01:07 2020 +0000
URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=2b23ff4b
dev-python/tekore: version bump 3.0.0
Package-Manager: Portage-3.0.5, Repoman-3.0.1
Signed-off-by: Andrew Ammerlaan <andrewammerlaan <AT> riseup.net>
dev-python/tekore/Manifest | 1 +
dev-python/tekore/files/tekore-fix-docs-path.patch | 13 +++++++
dev-python/tekore/tekore-3.0.0.ebuild | 44 ++++++++++++++++++++++
3 files changed, 58 insertions(+)
diff --git a/dev-python/tekore/Manifest b/dev-python/tekore/Manifest
index e158b1c..714ad64 100644
--- a/dev-python/tekore/Manifest
+++ b/dev-python/tekore/Manifest
@@ -1 +1,2 @@
DIST tekore-2.1.3.tar.gz 202522 BLAKE2B 2328116cf0d25e2c55e9f68c38064293bfb3e0d5361d02a7ed9f79a723ede54afeee2a355949ea619c56f02b242497a58044704197b757530cf51273b6970cc4 SHA512 d0895cdeee442bda19aecccd0cc2bd4022284972c535dac42d1aaa3c1e2b6676e9d80515cee44c555e6180b2b81a007fa43e77cb44f81c90e06aad6c6410d981
+DIST tekore-3.0.0.tar.gz 166551 BLAKE2B e463ace4140bd897053e93000abd5ea4604c11d6bcf4008faa4956dbdc69713d746da242a06681fb4a8138fe2e33c7193d2754a018eec1f5e4b5964090c90193 SHA512 644b2cf49614dfbd06bfa6dde45f01634f01b77eb3997f958962d38caa84c5ea580f224b8d529ec54fc1e4860244ee6f74b5eb163fcb534e0108bbc58f373f72
diff --git a/dev-python/tekore/files/tekore-fix-docs-path.patch b/dev-python/tekore/files/tekore-fix-docs-path.patch
new file mode 100644
index 0000000..ddd0b3a
--- /dev/null
+++ b/dev-python/tekore/files/tekore-fix-docs-path.patch
@@ -0,0 +1,13 @@
+diff --git a/docs/src/conf.py b/docs/src/conf.py
+index c99ca4e..4f216f8 100644
+--- a/docs/src/conf.py
++++ b/docs/src/conf.py
+@@ -3,7 +3,7 @@ import sys
+ from pathlib import Path
+
+ _root = Path(os.path.realpath(__file__)).parent.parent.parent
+-sys.path.insert(0, _root)
++sys.path.insert(0, str(_root))
+
+
+ project = 'tekore'
diff --git a/dev-python/tekore/tekore-3.0.0.ebuild b/dev-python/tekore/tekore-3.0.0.ebuild
new file mode 100644
index 0000000..2611f7b
--- /dev/null
+++ b/dev-python/tekore/tekore-3.0.0.ebuild
@@ -0,0 +1,44 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python3_{7,8} )
+
+inherit distutils-r1
+
+DESCRIPTION="Spotify Web API client"
+HOMEPAGE="https://tekore.readthedocs.io
+ https://github.com/felix-hilden/tekore"
+SRC_URI="https://github.com/felix-hilden/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="MIT"
+KEYWORDS="~amd64 ~x86"
+SLOT="0"
+
+RDEPEND="
+ dev-python/requests[${PYTHON_USEDEP}]
+ >=dev-python/httpx-0.11[${PYTHON_USEDEP}]
+ <dev-python/httpx-0.15[${PYTHON_USEDEP}]
+"
+
+BDEPEND="test? (
+ >=dev-python/pytest-asyncio-0.11[${PYTHON_USEDEP}]
+ <dev-python/pytest-asyncio-0.15[${PYTHON_USEDEP}]
+)"
+
+# fixes bug in conf.py: 'PosixPath' object has no attribute 'rstrip'
+PATCHES=( "${FILESDIR}/${PN}-fix-docs-path.patch" )
+
+DOCS="readme.rst"
+
+distutils_enable_tests pytest
+distutils_enable_sphinx docs/src dev-python/sphinx_rtd_theme dev-python/sphinx-autodoc-typehints
+
+python_prepare_all() {
+ # requires network
+ sed -i -e 's:test_bad_arguments_raises_error:_&:' \
+ tests/auth/expiring.py || die
+
+ distutils-r1_python_prepare_all
+}
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-09-04 11:01 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-02-03 18:07 [gentoo-commits] repo/proj/guru:dev commit in: dev-python/tekore/files/, dev-python/tekore/ Andrew Ammerlaan
-- strict thread matches above, loose matches on Subject: below --
2020-09-04 11:01 [gentoo-commits] repo/proj/guru:master commit in: dev-python/tekore/, dev-python/tekore/files/ Andrew Ammerlaan
2020-09-04 11:01 ` [gentoo-commits] repo/proj/guru:dev commit in: dev-python/tekore/files/, dev-python/tekore/ Andrew Ammerlaan
2020-01-21 14:49 Andrew Ammerlaan
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox