re-add RtmAPI-0.7.2 with 2to3 patch
This commit is contained in:
4
dev-python/RtmAPI/Manifest
Normal file
4
dev-python/RtmAPI/Manifest
Normal file
@@ -0,0 +1,4 @@
|
||||
AUX RtmAPI-0.7.2-2to3.patch 2681 BLAKE2B 606578432ac957924214f4c209ca7bf2c51d4254c1a8fe118d4af7a99d603504de17577a1dd30615450b70760a494a4913465a77f688e4a277c41c6ae9e30f1b SHA512 912cb24e13632f3fdadb0230a160890d6325e864b32f2e7c032cf6ac1372ad464d3af5185df1436a10f8384cfcd1c3f59ea915381839cdf13dbff21f2c2afdc8
|
||||
DIST RtmAPI-0.7.2.tar.gz 4088 BLAKE2B ca71115b866c6a6fff7887d199d92c55ce7bd1b319f2caedc92c3f7da90edcc111cedde1642c6493e2faca84f20b17fcfaa492ac67a1d56b9dc896b3eafc21b6 SHA512 e56b78484133664b0d101fd5023b0271ca5cee31febf5d8fc5ccdd43a592d3cbf5d0383b9d6e6b384b367f2e827c5842a0eaffd2b85093d4a017e0ceb0e891ae
|
||||
EBUILD RtmAPI-0.7.2-r2.ebuild 803 BLAKE2B 3d31c35bdef64e1941c7138d5d6364cf074dcafa9f69832f9cbe567d835d2d60d98196b08cc48b4edd2352bc0c202967ad233cd453a6467cb405e60e5737972d SHA512 ef65a413dc148e82e53916e1f4a03d7bda2cf9a114ce2434b9ff7ef5c6ff8b835b7667d415d9173d99e4c908e13ea785fd22bad427953f5c4b6ae4a2cf41e7ad
|
||||
MISC metadata.xml 462 BLAKE2B 40b2fb4afcc791a574a485aa64707c77268d09b9f60263f4f33ca4e648f797373624c1da0244ebc15fd2aa79c357a983e2f43d21094f701b86b61d1a57d81031 SHA512 1cd74af3f9cad793930ab71d22241de422c33a0376d830772583b788661fce936bc8807cc28796ae97393469012b33ef2d8fe2eaa042fd22afe2618241cf6e4c
|
||||
35
dev-python/RtmAPI/RtmAPI-0.7.2-r2.ebuild
Normal file
35
dev-python/RtmAPI/RtmAPI-0.7.2-r2.ebuild
Normal file
@@ -0,0 +1,35 @@
|
||||
# Copyright 1999-2022 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
PYTHON_COMPAT=( python3_{8..10} )
|
||||
|
||||
inherit distutils-r1
|
||||
|
||||
DESCRIPTION="API package for rememberthemilk.com"
|
||||
HOMEPAGE="https://bitbucket.org/rtmapi/rtmapi https://pypi.org/project/RtmAPI/"
|
||||
SRC_URI="mirror://pypi/${P:0:1}/${PN}/${P}.tar.gz"
|
||||
|
||||
LICENSE="MIT"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~arm ~arm64 ~x86 ~amd64-linux ~x86-linux"
|
||||
IUSE="test"
|
||||
RESTRICT="!test? ( test )"
|
||||
|
||||
DOCS="README"
|
||||
|
||||
RDEPEND=">=dev-python/httplib2-0.6.0[${PYTHON_USEDEP}]"
|
||||
BDEPEND="
|
||||
dev-python/setuptools[${PYTHON_USEDEP}]
|
||||
test? (
|
||||
dev-python/nose[${PYTHON_USEDEP}]
|
||||
dev-python/pytest[${PYTHON_USEDEP}]
|
||||
)"
|
||||
|
||||
PATCHES=( "${FILESDIR}/RtmAPI-0.7.2-2to3.patch" )
|
||||
|
||||
python_test() {
|
||||
nosetests --verbose || die
|
||||
py.test -v -v || die
|
||||
}
|
||||
66
dev-python/RtmAPI/files/RtmAPI-0.7.2-2to3.patch
Normal file
66
dev-python/RtmAPI/files/RtmAPI-0.7.2-2to3.patch
Normal file
@@ -0,0 +1,66 @@
|
||||
diff --git a/rtmapi/__init__.py b/rtmapi/__init__.py
|
||||
index b2ab7fb..01cb8f5 100644
|
||||
--- a/rtmapi/__init__.py
|
||||
+++ b/rtmapi/__init__.py
|
||||
@@ -1,6 +1,6 @@
|
||||
import hashlib
|
||||
import httplib2
|
||||
-import urllib
|
||||
+import urllib.request, urllib.parse, urllib.error
|
||||
import xml.etree.ElementTree as ElementTree
|
||||
|
||||
__author__ = "Michael Gruenewald <mail@michaelgruenewald.eu>"
|
||||
@@ -117,15 +117,15 @@ class Rtm(object):
|
||||
'Cache-Control': 'no-cache, max-age=0'})
|
||||
|
||||
def _make_request_url(self, request_url=None, **params):
|
||||
- all_params = params.items() + [("api_sig", self._sign_request(params))]
|
||||
- params_joined = urllib.urlencode(
|
||||
+ all_params = list(params.items()) + [("api_sig", self._sign_request(params))]
|
||||
+ params_joined = urllib.parse.urlencode(
|
||||
[(k, v.encode('utf-8')) for k, v in all_params])
|
||||
return (request_url or self._base_url) + "?" + params_joined
|
||||
|
||||
def _sign_request(self, params):
|
||||
- param_pairs = params.items()
|
||||
+ param_pairs = list(params.items())
|
||||
param_pairs.sort()
|
||||
- request_string = self.shared_secret + u''.join(k + v
|
||||
+ request_string = self.shared_secret + ''.join(k + v
|
||||
for k, v in param_pairs
|
||||
if v is not None)
|
||||
return hashlib.md5(request_string.encode('utf-8')).hexdigest()
|
||||
@@ -208,7 +208,7 @@ class RtmObject(RtmBase):
|
||||
def __getattr__(self, name):
|
||||
if name == "value":
|
||||
return self.__element.text
|
||||
- elif name in self.__element.keys():
|
||||
+ elif name in list(self.__element.keys()):
|
||||
return self.__element.get(name)
|
||||
elif (self.__name, name) in self.MORE_LISTS:
|
||||
return RtmIterable(self.__element,
|
||||
diff --git a/setup.py b/setup.py
|
||||
index 9eb6a76..6dd567c 100644
|
||||
--- a/setup.py
|
||||
+++ b/setup.py
|
||||
@@ -6,7 +6,7 @@ setup(
|
||||
author_email='mail@michaelgruenewald.eu',
|
||||
description='API package for rememberthemilk.com',
|
||||
long_description=open('README').read(),
|
||||
- license='License :: OSI Approved :: MIT License',
|
||||
+ license='MIT',
|
||||
url='https://bitbucket.org/rtmapi/rtmapi',
|
||||
version='0.7.2',
|
||||
packages=['rtmapi', ],
|
||||
@@ -16,11 +16,6 @@ setup(
|
||||
'License :: OSI Approved :: MIT License',
|
||||
'Operating System :: OS Independent',
|
||||
'Programming Language :: Python',
|
||||
- 'Programming Language :: Python :: 2',
|
||||
- 'Programming Language :: Python :: 2.6',
|
||||
- 'Programming Language :: Python :: 2.7',
|
||||
'Programming Language :: Python :: 3',
|
||||
- 'Programming Language :: Python :: 3.1',
|
||||
],
|
||||
- use_2to3=True,
|
||||
)
|
||||
15
dev-python/RtmAPI/metadata.xml
Normal file
15
dev-python/RtmAPI/metadata.xml
Normal file
@@ -0,0 +1,15 @@
|
||||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
|
||||
<pkgmetadata>
|
||||
<maintainer type="project">
|
||||
<email>b@edevau.net</email>
|
||||
<name>Andreas Billmeier</name>
|
||||
</maintainer>
|
||||
<upstream>
|
||||
<remote-id type="pypi">RtmAPI</remote-id>
|
||||
<maintainer status="unknown">
|
||||
<email>mail@michaelgruenewald.eu</email>
|
||||
<name>Michael Gruenewald</name>
|
||||
</maintainer>
|
||||
</upstream>
|
||||
</pkgmetadata>
|
||||
Reference in New Issue
Block a user