s3cmd: update to 2.0.0.
This commit is contained in:
parent
728f802315
commit
f3ff75ec96
2 changed files with 55 additions and 3 deletions
52
srcpkgs/s3cmd/patches/python2.patch
Normal file
52
srcpkgs/s3cmd/patches/python2.patch
Normal file
|
@ -0,0 +1,52 @@
|
||||||
|
From 58dbe1e727573ffb2eb95cc811bce7f56e3b0a25 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Florent Viard <fviard@lacie.com>
|
||||||
|
Date: Mon, 24 Jul 2017 11:44:49 +0200
|
||||||
|
Subject: [PATCH] Fixes #895 - Refactored py3 source to be byte-compilable with
|
||||||
|
py2 to fix warnings during "setup.py install"
|
||||||
|
|
||||||
|
---
|
||||||
|
S3/Custom_httplib3x.py | 11 ++++++++---
|
||||||
|
1 file changed, 8 insertions(+), 3 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/S3/Custom_httplib3x.py b/S3/Custom_httplib3x.py
|
||||||
|
index 50448a0f..42d84228 100644
|
||||||
|
--- S3/Custom_httplib3x.py
|
||||||
|
+++ S3/Custom_httplib3x.py
|
||||||
|
@@ -1,6 +1,7 @@
|
||||||
|
from __future__ import absolute_import, print_function
|
||||||
|
|
||||||
|
import os
|
||||||
|
+import sys
|
||||||
|
import http.client as httplib
|
||||||
|
|
||||||
|
from http.client import (_CS_REQ_SENT, _CS_REQ_STARTED, CONTINUE, UnknownProtocol,
|
||||||
|
@@ -23,14 +24,18 @@ def _encode(data, name='data'):
|
||||||
|
try:
|
||||||
|
return data.encode("latin-1")
|
||||||
|
except UnicodeEncodeError as err:
|
||||||
|
- raise UnicodeEncodeError(
|
||||||
|
+ # The following is equivalent to raise Exception() from None
|
||||||
|
+ # but is still byte-compilable compatible with python 2.
|
||||||
|
+ exc = UnicodeEncodeError(
|
||||||
|
err.encoding,
|
||||||
|
err.object,
|
||||||
|
err.start,
|
||||||
|
err.end,
|
||||||
|
"%s (%.20r) is not valid Latin-1. Use %s.encode('utf-8') "
|
||||||
|
"if you want to send it encoded in UTF-8." %
|
||||||
|
- (name.title(), data[err.start:err.end], name)) from None
|
||||||
|
+ (name.title(), data[err.start:err.end], name))
|
||||||
|
+ exc.__cause__ = None
|
||||||
|
+ raise exc
|
||||||
|
|
||||||
|
def httpresponse_patched_begin(self):
|
||||||
|
""" Re-implemented httplib begin function
|
||||||
|
@@ -204,7 +209,7 @@ def httpconnection_patched_send_request(self, method, url, body, headers,
|
||||||
|
elif resp.status == CONTINUE:
|
||||||
|
self.wrapper_send_body(body, encode_chunked)
|
||||||
|
|
||||||
|
-def httpconnection_patched_endheaders(self, message_body=None, *, encode_chunked=False):
|
||||||
|
+def httpconnection_patched_endheaders(self, message_body=None, encode_chunked=False):
|
||||||
|
"""REIMPLEMENTED because new argument encode_chunked added after py 3.4"""
|
||||||
|
"""Indicate that the last header line has been sent to the server.
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
# Template file for 's3cmd'
|
# Template file for 's3cmd'
|
||||||
pkgname=s3cmd
|
pkgname=s3cmd
|
||||||
version=1.6.1
|
version=2.0.0
|
||||||
revision=1
|
revision=1
|
||||||
noarch=yes
|
noarch=yes
|
||||||
build_style=python2-module
|
build_style=python2-module
|
||||||
|
@ -8,11 +8,11 @@ pycompile_module="S3"
|
||||||
hostmakedepends="python-setuptools"
|
hostmakedepends="python-setuptools"
|
||||||
depends="python-dateutil"
|
depends="python-dateutil"
|
||||||
short_desc="Command line tool for Amazon S3"
|
short_desc="Command line tool for Amazon S3"
|
||||||
maintainer="Eivind Uggedal <eivind@uggedal.com>"
|
maintainer="Duncaen <duncaen@voidlinux.eu>"
|
||||||
license="GPL-2"
|
license="GPL-2"
|
||||||
homepage="http://s3tools.org/s3cmd"
|
homepage="http://s3tools.org/s3cmd"
|
||||||
distfiles="https://github.com/s3tools/${pkgname}/archive/v${version}.tar.gz"
|
distfiles="https://github.com/s3tools/${pkgname}/archive/v${version}.tar.gz"
|
||||||
checksum=e3b962e94068230d4e3ec15b4e827e76cbe7e51dda0e80697ebffbe20b15098b
|
checksum=12698c115a52e4a705cf3dae67a84da3ccd9516c116bbc9717922d359fb8b18f
|
||||||
|
|
||||||
pre_install() {
|
pre_install() {
|
||||||
export S3CMD_INSTPATH_DOC="share/doc"
|
export S3CMD_INSTPATH_DOC="share/doc"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue