summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO9
-rw-r--r--PKGBUILD23
-rw-r--r--issue2481.patch148
3 files changed, 12 insertions, 168 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 60b17bc71c1c..f9ae4776122a 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,8 +1,8 @@
# Generated by mksrcinfo v8
-# Fri Apr 15 19:11:19 UTC 2016
+# Tue Sep 6 18:45:19 UTC 2016
pkgbase = jython-hg
pkgdesc = An implementation of the Python language written in Java
- pkgver = r7918+.87534ec6252a+
+ pkgver = r7962.91083509a11c
pkgrel = 1
url = http://www.jython.org/
install = jython.install
@@ -11,7 +11,8 @@ pkgbase = jython-hg
license = APACHE
license = custom
makedepends = apache-ant
- depends = jdk7-openjdk
+ makedepends = mercurial
+ depends = java-runtime
depends = bash
depends = python2
provides = jython
@@ -21,11 +22,9 @@ pkgbase = jython-hg
source = hg+https://hg.python.org/jython/
source = README.ArchLinux
source = jython.sh
- source = issue2481.patch
md5sums = SKIP
md5sums = 0a2e265af61c7d695e13b605dc180553
md5sums = c08ade059dae86b015f39842ceb465cf
- md5sums = a9f1dc09c8fdb2f1b3a0a2b9793a44df
pkgname = jython-hg
diff --git a/PKGBUILD b/PKGBUILD
index 2bfedf181b4b..3480c1692c14 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -5,45 +5,38 @@
# Contributor: Richard Murri <admin@richardmurri.com>
_pkgname=jython
pkgname=$_pkgname-hg
-pkgver=r7918+.87534ec6252a+
+pkgver=r7962.91083509a11c
pkgrel=1
pkgdesc="An implementation of the Python language written in Java"
arch=('any')
url="http://www.jython.org/"
license=('PSF' 'APACHE' 'custom')
-# Jython requires jdk7 for correct building
-# TODO: Find a way to accept both jdk7 and jdk7-openjdk
-depends=('jdk7-openjdk' 'bash' 'python2')
-makedepends=('apache-ant')
+depends=('java-runtime' 'bash' 'python2')
+makedepends=('apache-ant' 'mercurial')
backup=('opt/jython/registry')
options=('!emptydirs')
install='jython.install'
source=("hg+https://hg.python.org/jython/"
'README.ArchLinux'
- 'jython.sh'
- 'issue2481.patch')
+ 'jython.sh')
provides=('jython')
conflicts=('jython')
md5sums=('SKIP'
'0a2e265af61c7d695e13b605dc180553'
- 'c08ade059dae86b015f39842ceb465cf'
- 'a9f1dc09c8fdb2f1b3a0a2b9793a44df')
+ 'c08ade059dae86b015f39842ceb465cf')
pkgver() {
cd "$srcdir/$_pkgname"
printf "r%s.%s" "$(hg identify -n)" "$(hg identify -i)"
}
-prepare() {
- cd "$srcdir/$_pkgname"
- patch -i ../issue2481.patch -Np1
-}
-
build() {
cd "$srcdir/$_pkgname"
- JAVA_HOME="/usr/lib/jvm/java-7-openjdk" ant
+ # ANTLR 3 causes non-fatal errors with Java 8, so just try again
+ # http://stackoverflow.com/a/22367682/3786245
+ ant || ant
}
package() {
diff --git a/issue2481.patch b/issue2481.patch
deleted file mode 100644
index 5eff88db807e..000000000000
--- a/issue2481.patch
+++ /dev/null
@@ -1,148 +0,0 @@
-diff -r 87534ec6252a lib-python/2.7/urllib2.py
---- a/lib-python/2.7/urllib2.py Sat Mar 19 13:25:23 2016 +1100
-+++ b/lib-python/2.7/urllib2.py Sat Apr 16 02:59:36 2016 +0800
-@@ -109,6 +109,14 @@
- except ImportError:
- from StringIO import StringIO
-
-+# check for SSL
-+try:
-+ import ssl
-+except ImportError:
-+ _have_ssl = False
-+else:
-+ _have_ssl = True
-+
- from urllib import (unwrap, unquote, splittype, splithost, quote,
- addinfourl, splitport, splittag, toBytes,
- splitattr, ftpwrapper, splituser, splitpasswd, splitvalue)
-@@ -120,11 +128,30 @@
- __version__ = sys.version[:3]
-
- _opener = None
--def urlopen(url, data=None, timeout=socket._GLOBAL_DEFAULT_TIMEOUT):
-+def urlopen(url, data=None, timeout=socket._GLOBAL_DEFAULT_TIMEOUT,
-+ cafile=None, capath=None, cadefault=False, context=None):
- global _opener
-- if _opener is None:
-- _opener = build_opener()
-- return _opener.open(url, data, timeout)
-+ if cafile or capath or cadefault:
-+ if context is not None:
-+ raise ValueError(
-+ "You can't pass both context and any of cafile, capath, and "
-+ "cadefault"
-+ )
-+ if not _have_ssl:
-+ raise ValueError('SSL support not available')
-+ context = ssl.create_default_context(purpose=ssl.Purpose.SERVER_AUTH,
-+ cafile=cafile,
-+ capath=capath)
-+ https_handler = HTTPSHandler(context=context)
-+ opener = build_opener(https_handler)
-+ elif context:
-+ https_handler = HTTPSHandler(context=context)
-+ opener = build_opener(https_handler)
-+ elif _opener is None:
-+ _opener = opener = build_opener()
-+ else:
-+ opener = _opener
-+ return opener.open(url, data, timeout)
-
- def install_opener(opener):
- global _opener
-@@ -843,10 +870,7 @@
- password_mgr = HTTPPasswordMgr()
- self.passwd = password_mgr
- self.add_password = self.passwd.add_password
-- self.retried = 0
-
-- def reset_retry_count(self):
-- self.retried = 0
-
- def http_error_auth_reqed(self, authreq, host, req, headers):
- # host may be an authority (without userinfo) or a URL with an
-@@ -854,13 +878,6 @@
- # XXX could be multiple headers
- authreq = headers.get(authreq, None)
-
-- if self.retried > 5:
-- # retry sending the username:password 5 times before failing.
-- raise HTTPError(req.get_full_url(), 401, "basic auth failed",
-- headers, None)
-- else:
-- self.retried += 1
--
- if authreq:
- mo = AbstractBasicAuthHandler.rx.search(authreq)
- if mo:
-@@ -869,17 +886,14 @@
- warnings.warn("Basic Auth Realm was unquoted",
- UserWarning, 2)
- if scheme.lower() == 'basic':
-- response = self.retry_http_basic_auth(host, req, realm)
-- if response and response.code != 401:
-- self.retried = 0
-- return response
-+ return self.retry_http_basic_auth(host, req, realm)
-
- def retry_http_basic_auth(self, host, req, realm):
- user, pw = self.passwd.find_user_password(realm, host)
- if pw is not None:
- raw = "%s:%s" % (user, pw)
- auth = 'Basic %s' % base64.b64encode(raw).strip()
-- if req.headers.get(self.auth_header, None) == auth:
-+ if req.get_header(self.auth_header, None) == auth:
- return None
- req.add_unredirected_header(self.auth_header, auth)
- return self.parent.open(req, timeout=req.timeout)
-@@ -895,7 +909,6 @@
- url = req.get_full_url()
- response = self.http_error_auth_reqed('www-authenticate',
- url, req, headers)
-- self.reset_retry_count()
- return response
-
-
-@@ -911,7 +924,6 @@
- authority = req.get_host()
- response = self.http_error_auth_reqed('proxy-authenticate',
- authority, req, headers)
-- self.reset_retry_count()
- return response
-
-
-@@ -1136,7 +1148,7 @@
-
- return request
-
-- def do_open(self, http_class, req):
-+ def do_open(self, http_class, req, **http_conn_args):
- """Return an addinfourl object for the request, using http_class.
-
- http_class must implement the HTTPConnection API from httplib.
-@@ -1150,7 +1162,8 @@
- if not host:
- raise URLError('no host given')
-
-- h = http_class(host, timeout=req.timeout) # will parse host:port
-+ # will parse host:port
-+ h = http_class(host, timeout=req.timeout, **http_conn_args)
- h.set_debuglevel(self._debuglevel)
-
- headers = dict(req.unredirected_hdrs)
-@@ -1218,8 +1231,13 @@
- if hasattr(httplib, 'HTTPS'):
- class HTTPSHandler(AbstractHTTPHandler):
-
-+ def __init__(self, debuglevel=0, context=None):
-+ AbstractHTTPHandler.__init__(self, debuglevel)
-+ self._context = context
-+
- def https_open(self, req):
-- return self.do_open(httplib.HTTPSConnection, req)
-+ return self.do_open(httplib.HTTPSConnection, req,
-+ context=self._context)
-
- https_request = AbstractHTTPHandler.do_request_
-