View | Details | Raw Unified | Return to bug 164857
Collapse All | Expand All

(-)py-requests/Makefile (-2 / +13 lines)
Lines 6-12 Link Here
6
#
6
#
7
7
8
PORTNAME=	requests
8
PORTNAME=	requests
9
PORTVERSION=	0.8.6
9
PORTVERSION=	0.10.1
10
CATEGORIES=	www python
10
CATEGORIES=	www python
11
MASTER_SITES=	CHEESESHOP
11
MASTER_SITES=	CHEESESHOP
12
PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}
12
PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}
Lines 17-27 Link Here
17
LICENSE=	ISCL
17
LICENSE=	ISCL
18
LICENSE_FILE=	${WRKSRC}/LICENSE
18
LICENSE_FILE=	${WRKSRC}/LICENSE
19
19
20
RUN_DEPENDS=	${PYTHON_SITELIBDIR}/gevent/__init__.py:${PORTSDIR}/devel/py-gevent
20
BUILD_DEPENDS=	${PYTHON_PKGNAMEPREFIX}urllib3>=1.2:${PORTSDIR}/net/py-urllib3
21
RUN_DEPENDS=	${PYTHON_SITELIBDIR}/gevent/__init__.py:${PORTSDIR}/devel/py-gevent \
22
	${PYTHON_SITELIBDIR}/certifi/__init__.py:${PORTSDIR}/security/py-certify \
23
	${PYTHON_PKGNAMEPREFIX}urllib3>=1.2:${PORTSDIR}/net/py-urllib3 \
24
	${PYTHON_PKGNAMEPREFIX}chardet2>=2.0.1:${PORTSDIR}/textproc/py-chardet
21
25
22
USE_PYTHON=	2.6+
26
USE_PYTHON=	2.6+
23
USE_PYDISTUTILS=	easy_install
27
USE_PYDISTUTILS=	easy_install
24
28
29
REINPLACE_ARGS=	-i ""
30
25
PLIST_FILES=	%%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%
31
PLIST_FILES=	%%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%
26
32
33
post-patch:
34
	@${FIND} ${WRKSRC} -type f -name '*.orig' -exec ${RM} -f \{\} \;
35
	@${FIND} ${WRKSRC} -type f -name '*.py' | \
36
		${XARGS} ${REINPLACE_CMD} 's|is_linux|is_freebsd|g'
37
27
.include <bsd.port.mk>
38
.include <bsd.port.mk>
(-)py-requests/distinfo (-2 / +2 lines)
Lines 1-2 Link Here
1
SHA256 (requests-0.8.6.tar.gz) = b9ad56ff5971b7a4005598e5a9588584ee1153fbf027ed76a7d13585f71489f7
1
SHA256 (requests-0.10.1.tar.gz) = da6031575a30c7b65ea99465183468349b3645e6bf5322e49d53f565b27ed2b5
2
SIZE (requests-0.8.6.tar.gz) = 52670
2
SIZE (requests-0.10.1.tar.gz) = 63234
(-)py-requests/files/patch-MANIFEST.in (+5 lines)
Line 0 Link Here
1
--- MANIFEST.in.orig	2012-01-22 09:30:39.000000000 +0000
2
+++ MANIFEST.in	2012-02-07 15:15:00.000000000 +0000
3
@@ -1 +1 @@
4
-include README.rst LICENSE NOTICE HISTORY.rst test_requests.py
5
+include README.rst LICENSE NOTICE HISTORY.rst
(-)py-requests/files/patch-requests.egg-info_SOURCES.txt (+27 lines)
Line 0 Link Here
1
--- requests.egg-info/SOURCES.txt.orig	2012-01-23 07:22:50.000000000 +0000
2
+++ requests.egg-info/SOURCES.txt	2012-02-07 15:14:04.000000000 +0000
3
@@ -4,7 +4,6 @@
4
 NOTICE
5
 README.rst
6
 setup.py
7
-test_requests.py
8
 requests/__init__.py
9
 requests/api.py
10
 requests/async.py
11
@@ -28,15 +27,3 @@
12
 requests/packages/oreos/core.py
13
 requests/packages/oreos/monkeys.py
14
 requests/packages/oreos/structures.py
15
-requests/packages/urllib3/__init__.py
16
-requests/packages/urllib3/_collections.py
17
-requests/packages/urllib3/connectionpool.py
18
-requests/packages/urllib3/exceptions.py
19
-requests/packages/urllib3/filepost.py
20
-requests/packages/urllib3/poolmanager.py
21
-requests/packages/urllib3/request.py
22
-requests/packages/urllib3/response.py
23
-requests/packages/urllib3/packages/__init__.py
24
-requests/packages/urllib3/packages/six.py
25
-requests/packages/urllib3/packages/mimetools_choose_boundary/__init__.py
26
-requests/packages/urllib3/packages/ssl_match_hostname/__init__.py
27
\ No newline at end of file
(-)py-requests/files/patch-requests_compat.py (+21 lines)
Line 0 Link Here
1
--- requests/compat.py.orig	2012-01-23 06:35:35.000000000 +0000
2
+++ requests/compat.py	2012-02-07 15:46:29.000000000 +0000
3
@@ -4,7 +4,6 @@
4
 pythoncompat
5
 """
6
 
7
-
8
 import sys
9
 
10
 # -------
11
@@ -66,8 +65,8 @@
12
 # Windows-based system.
13
 is_windows = 'win32' in str(sys.platform).lower()
14
 
15
-# Standard Linux 2+ system.
16
-is_linux = ('linux' in str(sys.platform).lower())
17
+# Standard system.
18
+is_linux = ('freebsd' in str(sys.platform).lower())
19
 is_osx = ('darwin' in str(sys.platform).lower())
20
 is_hpux = ('hpux' in str(sys.platform).lower())   # Complete guess.
21
 is_solaris = ('solar==' in str(sys.platform).lower())   # Complete guess.
(-)py-requests/files/patch-requests_models.py (+21 lines)
Line 0 Link Here
1
--- requests/models.py.orig	2011-12-28 09:56:17.000000000 +0100
2
+++ requests/models.py	2012-01-12 17:54:01.000000000 +0100
3
@@ -19,12 +19,12 @@
4
 from .status_codes import codes
5
 from .packages import oreos
6
 from .auth import HTTPBasicAuth, HTTPProxyAuth
7
-from .packages.urllib3.response import HTTPResponse
8
-from .packages.urllib3.exceptions import MaxRetryError
9
-from .packages.urllib3.exceptions import SSLError as _SSLError
10
-from .packages.urllib3.exceptions import HTTPError as _HTTPError
11
-from .packages.urllib3 import connectionpool, poolmanager
12
-from .packages.urllib3.filepost import encode_multipart_formdata
13
+from urllib3.response import HTTPResponse
14
+from urllib3.exceptions import MaxRetryError
15
+from urllib3.exceptions import SSLError as _SSLError
16
+from urllib3.exceptions import HTTPError as _HTTPError
17
+from urllib3 import connectionpool, poolmanager
18
+from urllib3.filepost import encode_multipart_formdata
19
 from .exceptions import (
20
     ConnectionError, HTTPError, RequestException, Timeout, TooManyRedirects,
21
     URLRequired, SSLError)
(-)py-requests/files/patch-requests_packages___init__.py (+7 lines)
Line 0 Link Here
1
--- requests/packages/__init__.py.orig	2011-12-06 23:55:15.000000000 +0100
2
+++ requests/packages/__init__.py	2012-01-12 18:46:03.000000000 +0100
3
@@ -1,3 +1,3 @@
4
 from __future__ import absolute_import
5
 
6
-from . import urllib3
7
+#from . import urllib3
(-)py-requests/files/patch-requests_sessions.py (+11 lines)
Line 0 Link Here
1
--- requests/sessions.py.orig	2011-12-28 10:51:45.000000000 +0100
2
+++ requests/sessions.py	2012-01-12 23:30:39.000000000 +0100
3
@@ -13,7 +13,7 @@
4
 from .models import Request
5
 from .hooks import dispatch_hook
6
 from .utils import header_expand
7
-from .packages.urllib3.poolmanager import PoolManager
8
+from urllib3.poolmanager import PoolManager
9
 
10
 
11
 def merge_kwargs(local_kwarg, default_kwarg):
(-)py-requests/files/patch-setup.py (+46 lines)
Line 0 Link Here
1
--- setup.py.orig	2012-01-23 06:48:28.000000000 +0000
2
+++ setup.py	2012-02-07 16:11:32.000000000 +0000
3
@@ -4,10 +4,9 @@
4
 import os
5
 import sys
6
 import requests
7
-from requests.compat import is_py3
8
 
9
 try:
10
-    from setuptools import setup
11
+    from setuptools import setup, find_packages
12
 except ImportError:
13
     from distutils.core import setup
14
 
15
@@ -21,12 +20,8 @@
16
     os.system('python test_requests.py')
17
     sys.exit()
18
 
19
-required = ['certifi>=0.0.7',]
20
-
21
-if is_py3:
22
-    required.append('chardet2')
23
-else:
24
-    required.append('chardet>=1.0.0')
25
+# FreeBSD ports tree, provides only chardet2
26
+required = ['certifi>=0.0.7', 'chardet2>=1.0.0']
27
 
28
 
29
 setup(
30
@@ -38,15 +33,7 @@
31
     author='Kenneth Reitz',
32
     author_email='me@kennethreitz.com',
33
     url='http://python-requests.org',
34
-    packages=[
35
-        'requests',
36
-        'requests.packages',
37
-        'requests.packages.urllib3',
38
-        'requests.packages.urllib3.packages',
39
-        'requests.packages.urllib3.packages.ssl_match_hostname',
40
-        'requests.packages.urllib3.packages.mimetools_choose_boundary',
41
-        'requests.packages.oreos'
42
-    ],
43
+    packages=find_packages(where='.', exclude=['requests.packages.url*']),
44
     package_data={'': ['LICENSE', 'NOTICE']},
45
     include_package_data=True,
46
     install_requires=required,

Return to bug 164857