mirror of
https://git.FreeBSD.org/ports.git
synced 2024-11-24 00:45:52 +00:00
- Update to 0.10.1
PR: 164857 Submitted by: Olivier Duchateau <duchateau.olivier@gmail.com> (maintainer)
This commit is contained in:
parent
cb9fc6576d
commit
735f01e93a
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=292668
@ -6,7 +6,7 @@
|
||||
#
|
||||
|
||||
PORTNAME= requests
|
||||
PORTVERSION= 0.8.6
|
||||
PORTVERSION= 0.10.1
|
||||
CATEGORIES= www python
|
||||
MASTER_SITES= CHEESESHOP
|
||||
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
|
||||
@ -17,11 +17,22 @@ COMMENT= Requests is an elegant and simple HTTP library for Python
|
||||
LICENSE= ISCL
|
||||
LICENSE_FILE= ${WRKSRC}/LICENSE
|
||||
|
||||
RUN_DEPENDS= ${PYTHON_SITELIBDIR}/gevent/__init__.py:${PORTSDIR}/devel/py-gevent
|
||||
BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}urllib3>=1.2:${PORTSDIR}/net/py-urllib3
|
||||
RUN_DEPENDS= ${PYTHON_SITELIBDIR}/gevent/__init__.py:${PORTSDIR}/devel/py-gevent \
|
||||
${PYTHON_SITELIBDIR}/certifi/__init__.py:${PORTSDIR}/security/py-certify \
|
||||
${PYTHON_PKGNAMEPREFIX}urllib3>=1.2:${PORTSDIR}/net/py-urllib3 \
|
||||
${PYTHON_PKGNAMEPREFIX}chardet>=2.0.1:${PORTSDIR}/textproc/py-chardet
|
||||
|
||||
USE_PYTHON= 2.6+
|
||||
USE_PYDISTUTILS= easy_install
|
||||
|
||||
REINPLACE_ARGS= -i ""
|
||||
|
||||
PLIST_FILES= %%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%
|
||||
|
||||
post-patch:
|
||||
@${FIND} ${WRKSRC} -type f -name '*.orig' -exec ${RM} -f \{\} \;
|
||||
@${FIND} ${WRKSRC} -type f -name '*.py' | \
|
||||
${XARGS} ${REINPLACE_CMD} 's|is_linux|is_freebsd|g'
|
||||
|
||||
.include <bsd.port.mk>
|
||||
|
@ -1,2 +1,2 @@
|
||||
SHA256 (requests-0.8.6.tar.gz) = b9ad56ff5971b7a4005598e5a9588584ee1153fbf027ed76a7d13585f71489f7
|
||||
SIZE (requests-0.8.6.tar.gz) = 52670
|
||||
SHA256 (requests-0.10.1.tar.gz) = da6031575a30c7b65ea99465183468349b3645e6bf5322e49d53f565b27ed2b5
|
||||
SIZE (requests-0.10.1.tar.gz) = 63234
|
||||
|
5
www/py-requests/files/patch-MANIFEST.in
Normal file
5
www/py-requests/files/patch-MANIFEST.in
Normal file
@ -0,0 +1,5 @@
|
||||
--- MANIFEST.in.orig 2012-01-22 09:30:39.000000000 +0000
|
||||
+++ MANIFEST.in 2012-02-07 15:15:00.000000000 +0000
|
||||
@@ -1 +1 @@
|
||||
-include README.rst LICENSE NOTICE HISTORY.rst test_requests.py
|
||||
+include README.rst LICENSE NOTICE HISTORY.rst
|
27
www/py-requests/files/patch-requests.egg-info_SOURCES.txt
Normal file
27
www/py-requests/files/patch-requests.egg-info_SOURCES.txt
Normal file
@ -0,0 +1,27 @@
|
||||
--- requests.egg-info/SOURCES.txt.orig 2012-01-23 07:22:50.000000000 +0000
|
||||
+++ requests.egg-info/SOURCES.txt 2012-02-07 15:14:04.000000000 +0000
|
||||
@@ -4,7 +4,6 @@
|
||||
NOTICE
|
||||
README.rst
|
||||
setup.py
|
||||
-test_requests.py
|
||||
requests/__init__.py
|
||||
requests/api.py
|
||||
requests/async.py
|
||||
@@ -28,15 +27,3 @@
|
||||
requests/packages/oreos/core.py
|
||||
requests/packages/oreos/monkeys.py
|
||||
requests/packages/oreos/structures.py
|
||||
-requests/packages/urllib3/__init__.py
|
||||
-requests/packages/urllib3/_collections.py
|
||||
-requests/packages/urllib3/connectionpool.py
|
||||
-requests/packages/urllib3/exceptions.py
|
||||
-requests/packages/urllib3/filepost.py
|
||||
-requests/packages/urllib3/poolmanager.py
|
||||
-requests/packages/urllib3/request.py
|
||||
-requests/packages/urllib3/response.py
|
||||
-requests/packages/urllib3/packages/__init__.py
|
||||
-requests/packages/urllib3/packages/six.py
|
||||
-requests/packages/urllib3/packages/mimetools_choose_boundary/__init__.py
|
||||
-requests/packages/urllib3/packages/ssl_match_hostname/__init__.py
|
||||
\ No newline at end of file
|
21
www/py-requests/files/patch-requests_compat.py
Normal file
21
www/py-requests/files/patch-requests_compat.py
Normal file
@ -0,0 +1,21 @@
|
||||
--- requests/compat.py.orig 2012-01-23 06:35:35.000000000 +0000
|
||||
+++ requests/compat.py 2012-02-07 15:46:29.000000000 +0000
|
||||
@@ -4,7 +4,6 @@
|
||||
pythoncompat
|
||||
"""
|
||||
|
||||
-
|
||||
import sys
|
||||
|
||||
# -------
|
||||
@@ -66,8 +65,8 @@
|
||||
# Windows-based system.
|
||||
is_windows = 'win32' in str(sys.platform).lower()
|
||||
|
||||
-# Standard Linux 2+ system.
|
||||
-is_linux = ('linux' in str(sys.platform).lower())
|
||||
+# Standard system.
|
||||
+is_linux = ('freebsd' in str(sys.platform).lower())
|
||||
is_osx = ('darwin' in str(sys.platform).lower())
|
||||
is_hpux = ('hpux' in str(sys.platform).lower()) # Complete guess.
|
||||
is_solaris = ('solar==' in str(sys.platform).lower()) # Complete guess.
|
21
www/py-requests/files/patch-requests_models.py
Normal file
21
www/py-requests/files/patch-requests_models.py
Normal file
@ -0,0 +1,21 @@
|
||||
--- requests/models.py.orig 2011-12-28 09:56:17.000000000 +0100
|
||||
+++ requests/models.py 2012-01-12 17:54:01.000000000 +0100
|
||||
@@ -19,12 +19,12 @@
|
||||
from .status_codes import codes
|
||||
from .packages import oreos
|
||||
from .auth import HTTPBasicAuth, HTTPProxyAuth
|
||||
-from .packages.urllib3.response import HTTPResponse
|
||||
-from .packages.urllib3.exceptions import MaxRetryError
|
||||
-from .packages.urllib3.exceptions import SSLError as _SSLError
|
||||
-from .packages.urllib3.exceptions import HTTPError as _HTTPError
|
||||
-from .packages.urllib3 import connectionpool, poolmanager
|
||||
-from .packages.urllib3.filepost import encode_multipart_formdata
|
||||
+from urllib3.response import HTTPResponse
|
||||
+from urllib3.exceptions import MaxRetryError
|
||||
+from urllib3.exceptions import SSLError as _SSLError
|
||||
+from urllib3.exceptions import HTTPError as _HTTPError
|
||||
+from urllib3 import connectionpool, poolmanager
|
||||
+from urllib3.filepost import encode_multipart_formdata
|
||||
from .exceptions import (
|
||||
ConnectionError, HTTPError, RequestException, Timeout, TooManyRedirects,
|
||||
URLRequired, SSLError)
|
@ -0,0 +1,7 @@
|
||||
--- requests/packages/__init__.py.orig 2011-12-06 23:55:15.000000000 +0100
|
||||
+++ requests/packages/__init__.py 2012-01-12 18:46:03.000000000 +0100
|
||||
@@ -1,3 +1,3 @@
|
||||
from __future__ import absolute_import
|
||||
|
||||
-from . import urllib3
|
||||
+#from . import urllib3
|
11
www/py-requests/files/patch-requests_sessions.py
Normal file
11
www/py-requests/files/patch-requests_sessions.py
Normal file
@ -0,0 +1,11 @@
|
||||
--- requests/sessions.py.orig 2011-12-28 10:51:45.000000000 +0100
|
||||
+++ requests/sessions.py 2012-01-12 23:30:39.000000000 +0100
|
||||
@@ -13,7 +13,7 @@
|
||||
from .models import Request
|
||||
from .hooks import dispatch_hook
|
||||
from .utils import header_expand
|
||||
-from .packages.urllib3.poolmanager import PoolManager
|
||||
+from urllib3.poolmanager import PoolManager
|
||||
|
||||
|
||||
def merge_kwargs(local_kwarg, default_kwarg):
|
46
www/py-requests/files/patch-setup.py
Normal file
46
www/py-requests/files/patch-setup.py
Normal file
@ -0,0 +1,46 @@
|
||||
--- setup.py.orig 2012-01-23 06:48:28.000000000 +0000
|
||||
+++ setup.py 2012-02-07 16:11:32.000000000 +0000
|
||||
@@ -4,10 +4,9 @@
|
||||
import os
|
||||
import sys
|
||||
import requests
|
||||
-from requests.compat import is_py3
|
||||
|
||||
try:
|
||||
- from setuptools import setup
|
||||
+ from setuptools import setup, find_packages
|
||||
except ImportError:
|
||||
from distutils.core import setup
|
||||
|
||||
@@ -21,12 +20,8 @@
|
||||
os.system('python test_requests.py')
|
||||
sys.exit()
|
||||
|
||||
-required = ['certifi>=0.0.7',]
|
||||
-
|
||||
-if is_py3:
|
||||
- required.append('chardet2')
|
||||
-else:
|
||||
- required.append('chardet>=1.0.0')
|
||||
+# FreeBSD ports tree, provides only chardet2
|
||||
+required = ['certifi>=0.0.7', 'chardet2>=1.0.0']
|
||||
|
||||
|
||||
setup(
|
||||
@@ -38,15 +33,7 @@
|
||||
author='Kenneth Reitz',
|
||||
author_email='me@kennethreitz.com',
|
||||
url='http://python-requests.org',
|
||||
- packages=[
|
||||
- 'requests',
|
||||
- 'requests.packages',
|
||||
- 'requests.packages.urllib3',
|
||||
- 'requests.packages.urllib3.packages',
|
||||
- 'requests.packages.urllib3.packages.ssl_match_hostname',
|
||||
- 'requests.packages.urllib3.packages.mimetools_choose_boundary',
|
||||
- 'requests.packages.oreos'
|
||||
- ],
|
||||
+ packages=find_packages(where='.', exclude=['requests.packages.url*']),
|
||||
package_data={'': ['LICENSE', 'NOTICE']},
|
||||
include_package_data=True,
|
||||
install_requires=required,
|
Loading…
Reference in New Issue
Block a user