update shared
This commit is contained in:
parent
1c7d934c4c
commit
9d7763e017
51 changed files with 566 additions and 337 deletions
|
@ -18,6 +18,6 @@
|
|||
../PyPDF2/__pycache__/__init__.cpython-34.pyc
|
||||
./
|
||||
top_level.txt
|
||||
PKG-INFO
|
||||
dependency_links.txt
|
||||
PKG-INFO
|
||||
SOURCES.txt
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
Metadata-Version: 2.0
|
||||
Name: certifi
|
||||
Version: 2015.11.20
|
||||
Version: 2015.11.20.1
|
||||
Summary: Python package for providing Mozilla's CA Bundle.
|
||||
Home-page: http://certifi.io/
|
||||
Author: Kenneth Reitz
|
|
@ -0,0 +1,15 @@
|
|||
certifi/__init__.py,sha256=PQnlDAmiQCFAKkk9KwohQdKLi4jKgLwHAEpMMj-Rno4,65
|
||||
certifi/__main__.py,sha256=FiOYt1Fltst7wk9DRa6GCoBr8qBUxlNQu_MKJf04E6s,41
|
||||
certifi/cacert.pem,sha256=j_IWL25eEgetcl_WsBPVc3qYwpOleezC6wo_zWb98V0,315580
|
||||
certifi/core.py,sha256=DqvIINYNNXsp3Srlk_NRaiizaww8po3l8t8ksz-Xt6Q,716
|
||||
certifi/old_root.pem,sha256=HT0KIfaM83q0XHFqGEesiGyfmlSWuD2RI0-AVIS2srY,25626
|
||||
certifi/weak.pem,sha256=xskENxE0VZ4EYMX3tG9oB1mWMW1ACaliQwPPNP0ctiQ,341206
|
||||
certifi-2015.11.20.1.dist-info/DESCRIPTION.rst,sha256=u4KmW8nf84KSFVrJue_kb-ArB1h3uUQT4H6CV_oOeUI,1706
|
||||
certifi-2015.11.20.1.dist-info/METADATA,sha256=QOGx0SByMIj_w9WgfFhr2O24DO9QOh-HXTXwK0KaoTc,2524
|
||||
certifi-2015.11.20.1.dist-info/RECORD,,
|
||||
certifi-2015.11.20.1.dist-info/WHEEL,sha256=GrqQvamwgBV4nLoJe0vhYRSWzWsx7xjlt74FT0SWYfE,110
|
||||
certifi-2015.11.20.1.dist-info/metadata.json,sha256=8RXsg-wuDBJKT4gTtcMHe24CkOA8JVIcInVG7PN1VbA,913
|
||||
certifi-2015.11.20.1.dist-info/top_level.txt,sha256=KMu4vUCfsjLrkPbSNdgdekS-pVJzBAJFO__nI8NF6-U,8
|
||||
certifi/__pycache__/__main__.cpython-34.pyc,,
|
||||
certifi/__pycache__/core.cpython-34.pyc,,
|
||||
certifi/__pycache__/__init__.cpython-34.pyc,,
|
|
@ -1 +1 @@
|
|||
{"generator": "bdist_wheel (0.26.0)", "summary": "Python package for providing Mozilla's CA Bundle.", "classifiers": ["Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", "Natural Language :: English", "Programming Language :: Python", "Programming Language :: Python :: 2.5", "Programming Language :: Python :: 2.6", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3.0", "Programming Language :: Python :: 3.1", "Programming Language :: Python :: 3.2", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4"], "extensions": {"python.details": {"project_urls": {"Home": "http://certifi.io/"}, "contacts": [{"email": "me@kennethreitz.com", "name": "Kenneth Reitz", "role": "author"}], "document_names": {"description": "DESCRIPTION.rst"}}}, "license": "ISC", "metadata_version": "2.0", "name": "certifi", "version": "2015.11.20"}
|
||||
{"generator": "bdist_wheel (0.26.0)", "summary": "Python package for providing Mozilla's CA Bundle.", "classifiers": ["Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", "Natural Language :: English", "Programming Language :: Python", "Programming Language :: Python :: 2.5", "Programming Language :: Python :: 2.6", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3.0", "Programming Language :: Python :: 3.1", "Programming Language :: Python :: 3.2", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4"], "extensions": {"python.details": {"project_urls": {"Home": "http://certifi.io/"}, "contacts": [{"email": "me@kennethreitz.com", "name": "Kenneth Reitz", "role": "author"}], "document_names": {"description": "DESCRIPTION.rst"}}}, "license": "ISC", "metadata_version": "2.0", "name": "certifi", "version": "2015.11.20.1"}
|
|
@ -1,15 +0,0 @@
|
|||
certifi/__init__.py,sha256=hG3J5tdsVc9gHdErxXJQnes5-EQI_102Y5UXk0G-qkk,63
|
||||
certifi/__main__.py,sha256=FiOYt1Fltst7wk9DRa6GCoBr8qBUxlNQu_MKJf04E6s,41
|
||||
certifi/cacert.pem,sha256=j_IWL25eEgetcl_WsBPVc3qYwpOleezC6wo_zWb98V0,315580
|
||||
certifi/core.py,sha256=DqvIINYNNXsp3Srlk_NRaiizaww8po3l8t8ksz-Xt6Q,716
|
||||
certifi/old_root.pem,sha256=Sm1SGy9Y3FjEDEy9ie0EX39fcJCv_r6gAPtj9yBrXEY,24014
|
||||
certifi/weak.pem,sha256=spA74ndnORVAEKwL68MswT1BBXwtOHd9ht2vIKRF0oE,339594
|
||||
certifi-2015.11.20.dist-info/DESCRIPTION.rst,sha256=u4KmW8nf84KSFVrJue_kb-ArB1h3uUQT4H6CV_oOeUI,1706
|
||||
certifi-2015.11.20.dist-info/METADATA,sha256=z-iWa7SyyBzqckDPWM7zx6oVo6C3EYMn3xKBp7Mgzgg,2522
|
||||
certifi-2015.11.20.dist-info/RECORD,,
|
||||
certifi-2015.11.20.dist-info/WHEEL,sha256=GrqQvamwgBV4nLoJe0vhYRSWzWsx7xjlt74FT0SWYfE,110
|
||||
certifi-2015.11.20.dist-info/metadata.json,sha256=wO51GWDU74nDlRgLGR8kNuvtzKreMz0K4Fp3E4fhUys,911
|
||||
certifi-2015.11.20.dist-info/top_level.txt,sha256=KMu4vUCfsjLrkPbSNdgdekS-pVJzBAJFO__nI8NF6-U,8
|
||||
certifi/__pycache__/core.cpython-34.pyc,,
|
||||
certifi/__pycache__/__init__.cpython-34.pyc,,
|
||||
certifi/__pycache__/__main__.cpython-34.pyc,,
|
|
@ -1,3 +1,3 @@
|
|||
from .core import where, old_where
|
||||
|
||||
__version__ = "2015.11.20"
|
||||
__version__ = "2015.11.20.1"
|
||||
|
|
|
@ -385,3 +385,30 @@ GwnpXtlR22ciYaQqPEh346B8pt5zohQDhT37qw4wxYMWM4ETCJ57NE7fQMh017l9
|
|||
3PR2VX2bY1QY6fDq81yx2YtCHrnAlU66+tXifPVoYb+O7AWXX1uw16OFNMQkpw0P
|
||||
lZPvy5TYnh+dXIVtx6quTx8itc2VrbqnzPmrC3p/
|
||||
-----END CERTIFICATE-----
|
||||
|
||||
# Issuer: C=US, O=Equifax, OU=Equifax Secure Certificate Authority
|
||||
# Subject: C=US, O=Equifax, OU=Equifax Secure Certificate Authority
|
||||
# Label: "Equifax Secure Certificate Authority"
|
||||
# Serial: 903804111
|
||||
# MD5 Fingerprint: 67:cb:9d:c0:13:24:8a:82:9b:b2:17:1e:d1:1b:ec:d4
|
||||
# SHA1 Fingerprint: d2:32:09:ad:23:d3:14:23:21:74:e4:0d:7f:9d:62:13:97:86:63:3a
|
||||
# SHA256 Fingerprint: 08:29:7a:40:47:db:a2:36:80:c7:31:db:6e:31:76:53:ca:78:48:e1:be:bd:3a:0b:01:79:a7:07:f9:2c:f1:78
|
||||
-----BEGIN CERTIFICATE-----
|
||||
MIIDIDCCAomgAwIBAgIENd70zzANBgkqhkiG9w0BAQUFADBOMQswCQYDVQQGEwJV
|
||||
UzEQMA4GA1UEChMHRXF1aWZheDEtMCsGA1UECxMkRXF1aWZheCBTZWN1cmUgQ2Vy
|
||||
dGlmaWNhdGUgQXV0aG9yaXR5MB4XDTk4MDgyMjE2NDE1MVoXDTE4MDgyMjE2NDE1
|
||||
MVowTjELMAkGA1UEBhMCVVMxEDAOBgNVBAoTB0VxdWlmYXgxLTArBgNVBAsTJEVx
|
||||
dWlmYXggU2VjdXJlIENlcnRpZmljYXRlIEF1dGhvcml0eTCBnzANBgkqhkiG9w0B
|
||||
AQEFAAOBjQAwgYkCgYEAwV2xWGcIYu6gmi0fCG2RFGiYCh7+2gRvE4RiIcPRfM6f
|
||||
BeC4AfBONOziipUEZKzxa1NfBbPLZ4C/QgKO/t0BCezhABRP/PvwDN1Dulsr4R+A
|
||||
cJkVV5MW8Q+XarfCaCMczE1ZMKxRHjuvK9buY0V7xdlfUNLjUA86iOe/FP3gx7kC
|
||||
AwEAAaOCAQkwggEFMHAGA1UdHwRpMGcwZaBjoGGkXzBdMQswCQYDVQQGEwJVUzEQ
|
||||
MA4GA1UEChMHRXF1aWZheDEtMCsGA1UECxMkRXF1aWZheCBTZWN1cmUgQ2VydGlm
|
||||
aWNhdGUgQXV0aG9yaXR5MQ0wCwYDVQQDEwRDUkwxMBoGA1UdEAQTMBGBDzIwMTgw
|
||||
ODIyMTY0MTUxWjALBgNVHQ8EBAMCAQYwHwYDVR0jBBgwFoAUSOZo+SvSspXXR9gj
|
||||
IBBPM5iQn9QwHQYDVR0OBBYEFEjmaPkr0rKV10fYIyAQTzOYkJ/UMAwGA1UdEwQF
|
||||
MAMBAf8wGgYJKoZIhvZ9B0EABA0wCxsFVjMuMGMDAgbAMA0GCSqGSIb3DQEBBQUA
|
||||
A4GBAFjOKer89961zgK5F7WF0bnj4JXMJTENAKaSbn+2kmOeUJXRmm/kEd5jhW6Y
|
||||
7qj/WsjTVbJmcVfewCHrPSqnI0kBBIZCe/zuf6IWUrVnZ9NA2zsmWLIodz2uFHdh
|
||||
1voqZiegDfqnc1zqcPGUIWVEX/r87yloqaKHee9570+sB3c4
|
||||
-----END CERTIFICATE-----
|
||||
|
|
|
@ -5537,3 +5537,30 @@ GwnpXtlR22ciYaQqPEh346B8pt5zohQDhT37qw4wxYMWM4ETCJ57NE7fQMh017l9
|
|||
3PR2VX2bY1QY6fDq81yx2YtCHrnAlU66+tXifPVoYb+O7AWXX1uw16OFNMQkpw0P
|
||||
lZPvy5TYnh+dXIVtx6quTx8itc2VrbqnzPmrC3p/
|
||||
-----END CERTIFICATE-----
|
||||
|
||||
# Issuer: C=US, O=Equifax, OU=Equifax Secure Certificate Authority
|
||||
# Subject: C=US, O=Equifax, OU=Equifax Secure Certificate Authority
|
||||
# Label: "Equifax Secure Certificate Authority"
|
||||
# Serial: 903804111
|
||||
# MD5 Fingerprint: 67:cb:9d:c0:13:24:8a:82:9b:b2:17:1e:d1:1b:ec:d4
|
||||
# SHA1 Fingerprint: d2:32:09:ad:23:d3:14:23:21:74:e4:0d:7f:9d:62:13:97:86:63:3a
|
||||
# SHA256 Fingerprint: 08:29:7a:40:47:db:a2:36:80:c7:31:db:6e:31:76:53:ca:78:48:e1:be:bd:3a:0b:01:79:a7:07:f9:2c:f1:78
|
||||
-----BEGIN CERTIFICATE-----
|
||||
MIIDIDCCAomgAwIBAgIENd70zzANBgkqhkiG9w0BAQUFADBOMQswCQYDVQQGEwJV
|
||||
UzEQMA4GA1UEChMHRXF1aWZheDEtMCsGA1UECxMkRXF1aWZheCBTZWN1cmUgQ2Vy
|
||||
dGlmaWNhdGUgQXV0aG9yaXR5MB4XDTk4MDgyMjE2NDE1MVoXDTE4MDgyMjE2NDE1
|
||||
MVowTjELMAkGA1UEBhMCVVMxEDAOBgNVBAoTB0VxdWlmYXgxLTArBgNVBAsTJEVx
|
||||
dWlmYXggU2VjdXJlIENlcnRpZmljYXRlIEF1dGhvcml0eTCBnzANBgkqhkiG9w0B
|
||||
AQEFAAOBjQAwgYkCgYEAwV2xWGcIYu6gmi0fCG2RFGiYCh7+2gRvE4RiIcPRfM6f
|
||||
BeC4AfBONOziipUEZKzxa1NfBbPLZ4C/QgKO/t0BCezhABRP/PvwDN1Dulsr4R+A
|
||||
cJkVV5MW8Q+XarfCaCMczE1ZMKxRHjuvK9buY0V7xdlfUNLjUA86iOe/FP3gx7kC
|
||||
AwEAAaOCAQkwggEFMHAGA1UdHwRpMGcwZaBjoGGkXzBdMQswCQYDVQQGEwJVUzEQ
|
||||
MA4GA1UEChMHRXF1aWZheDEtMCsGA1UECxMkRXF1aWZheCBTZWN1cmUgQ2VydGlm
|
||||
aWNhdGUgQXV0aG9yaXR5MQ0wCwYDVQQDEwRDUkwxMBoGA1UdEAQTMBGBDzIwMTgw
|
||||
ODIyMTY0MTUxWjALBgNVHQ8EBAMCAQYwHwYDVR0jBBgwFoAUSOZo+SvSspXXR9gj
|
||||
IBBPM5iQn9QwHQYDVR0OBBYEFEjmaPkr0rKV10fYIyAQTzOYkJ/UMAwGA1UdEwQF
|
||||
MAMBAf8wGgYJKoZIhvZ9B0EABA0wCxsFVjMuMGMDAgbAMA0GCSqGSIb3DQEBBQUA
|
||||
A4GBAFjOKer89961zgK5F7WF0bnj4JXMJTENAKaSbn+2kmOeUJXRmm/kEd5jhW6Y
|
||||
7qj/WsjTVbJmcVfewCHrPSqnI0kBBIZCe/zuf6IWUrVnZ9NA2zsmWLIodz2uFHdh
|
||||
1voqZiegDfqnc1zqcPGUIWVEX/r87yloqaKHee9570+sB3c4
|
||||
-----END CERTIFICATE-----
|
||||
|
|
|
@ -71,8 +71,8 @@
|
|||
../html5lib/trie/__pycache__/datrie.cpython-34.pyc
|
||||
../html5lib/trie/__pycache__/py.cpython-34.pyc
|
||||
./
|
||||
dependency_links.txt
|
||||
requires.txt
|
||||
top_level.txt
|
||||
dependency_links.txt
|
||||
PKG-INFO
|
||||
requires.txt
|
||||
SOURCES.txt
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
Metadata-Version: 1.1
|
||||
Name: ox
|
||||
Version: 2.3.b-769-
|
||||
Version: 2.3.b-777-
|
||||
Summary: python-ox - the web in a dict
|
||||
Home-page: https://wiki.0x2620.org/wiki/python-ox
|
||||
Author: 0x2620
|
|
@ -159,8 +159,8 @@
|
|||
../ox/web/__pycache__/wikipedia.cpython-34.pyc
|
||||
../ox/web/__pycache__/youtube.cpython-34.pyc
|
||||
./
|
||||
top_level.txt
|
||||
PKG-INFO
|
||||
requires.txt
|
||||
dependency_links.txt
|
||||
requires.txt
|
||||
PKG-INFO
|
||||
top_level.txt
|
||||
SOURCES.txt
|
|
@ -1 +1 @@
|
|||
VERSION="2.3.b'769'"
|
||||
VERSION="2.3.b'777'"
|
|
@ -144,6 +144,17 @@ class Cache:
|
|||
def set(self, url, post_data, data, headers):
|
||||
pass
|
||||
|
||||
def get_domain(self, url):
|
||||
return ".".join(urllib.parse.urlparse(url)[1].split('.')[-2:])
|
||||
|
||||
def get_url_hash(self, url, data=None):
|
||||
if data:
|
||||
url_hash = hashlib.sha1((url + '?' + data).encode('utf-8')).hexdigest()
|
||||
else:
|
||||
url_hash = hashlib.sha1(url.encode('utf-8')).hexdigest()
|
||||
return url_hash
|
||||
|
||||
|
||||
class SQLiteCache(Cache):
|
||||
def __init__(self):
|
||||
path = cache_path()
|
||||
|
@ -171,7 +182,7 @@ class SQLiteCache(Cache):
|
|||
self.set_setting(c, 'version', 1)
|
||||
c.execute('''ALTER TABLE cache ADD compressed INT DEFAULT 0''')
|
||||
conn.commit()
|
||||
|
||||
|
||||
def get_setting(self, c, key, default=None):
|
||||
c.execute('SELECT value FROM setting WHERE key = ?', (key, ))
|
||||
for row in c:
|
||||
|
@ -185,10 +196,7 @@ class SQLiteCache(Cache):
|
|||
r = None
|
||||
if timeout == 0:
|
||||
return r
|
||||
if data:
|
||||
url_hash = hashlib.sha1((url + '?' + data).encode('utf-8')).hexdigest()
|
||||
else:
|
||||
url_hash = hashlib.sha1(url.encode('utf-8')).hexdigest()
|
||||
url_hash = self.get_url_hash(url, data)
|
||||
|
||||
conn = self.connect()
|
||||
c = conn.cursor()
|
||||
|
@ -217,13 +225,20 @@ class SQLiteCache(Cache):
|
|||
conn.close()
|
||||
return r
|
||||
|
||||
def set(self, url, post_data, data, headers):
|
||||
if post_data:
|
||||
url_hash = hashlib.sha1((url + '?' + post_data).encode('utf-8')).hexdigest()
|
||||
else:
|
||||
url_hash = hashlib.sha1(url.encode('utf-8')).hexdigest()
|
||||
def delete(self, url, data=None, headers=DEFAULT_HEADERS):
|
||||
url_hash = self.get_url_hash(url, data)
|
||||
conn = self.connect()
|
||||
c = conn.cursor()
|
||||
sql = 'DELETE FROM cache WHERE url_hash=?'
|
||||
t = (url_hash, )
|
||||
c.execute(sql, t)
|
||||
conn.commit()
|
||||
c.close()
|
||||
conn.close()
|
||||
|
||||
domain = ".".join(urllib.parse.urlparse(url)[1].split('.')[-2:])
|
||||
def set(self, url, post_data, data, headers):
|
||||
url_hash = self.get_url_hash(url, post_data)
|
||||
domain = self.get_domain(url)
|
||||
|
||||
conn = self.connect()
|
||||
c = conn.cursor()
|
||||
|
@ -268,18 +283,15 @@ class FileCache(Cache):
|
|||
i = os.path.join(prefix, '%s.json'%h)
|
||||
f = os.path.join(prefix, '%s.dat'%h)
|
||||
return prefix, i, f
|
||||
|
||||
|
||||
def get(self, url, data={}, headers=DEFAULT_HEADERS, timeout=-1, value="data"):
|
||||
r = None
|
||||
if timeout == 0:
|
||||
return r
|
||||
|
||||
if data:
|
||||
url_hash = hashlib.sha1((url + '?' + data).encode('utf-8')).hexdigest()
|
||||
else:
|
||||
url_hash = hashlib.sha1(url.encode('utf-8')).hexdigest()
|
||||
url_hash = self.get_url_hash(url, data)
|
||||
domain = self.get_domain(url)
|
||||
|
||||
domain = ".".join(urllib.parse.urlparse(url)[1].split('.')[-2:])
|
||||
prefix, i, f = self.files(domain, url_hash)
|
||||
if os.path.exists(i):
|
||||
with open(i) as _i:
|
||||
|
@ -302,13 +314,18 @@ class FileCache(Cache):
|
|||
r = zlib.decompress(r)
|
||||
return r
|
||||
|
||||
def set(self, url, post_data, data, headers):
|
||||
if post_data:
|
||||
url_hash = hashlib.sha1((url + '?' + post_data).encode('utf-8')).hexdigest()
|
||||
else:
|
||||
url_hash = hashlib.sha1(url.encode('utf-8')).hexdigest()
|
||||
def delete(self, url, data=None, headers=DEFAULT_HEADERS):
|
||||
url_hash = self.get_url_hash(url, data)
|
||||
domain = self.get_domain(url)
|
||||
|
||||
prefix, i, f = self.files(domain, url_hash)
|
||||
if os.path.exists(i):
|
||||
os.unlink(i)
|
||||
|
||||
def set(self, url, post_data, data, headers):
|
||||
url_hash = self.get_url_hash(url, post_data)
|
||||
domain = self.get_domain(url)
|
||||
|
||||
domain = ".".join(urllib.parse.urlparse(url)[1].split('.')[-2:])
|
||||
prefix, i, f = self.files(domain, url_hash)
|
||||
makedirs(prefix)
|
||||
|
||||
|
|
|
@ -190,10 +190,11 @@ def avinfo(filename, cached=True):
|
|||
p = subprocess.Popen([ffmpeg, '-i', filename], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
|
||||
stdout, stderr = p.communicate()
|
||||
languages = [re.compile('\((.+?)\):').findall(l) for l in stderr.split('\n') if 'Stream' in l and 'Audio' in l]
|
||||
for i, stream in enumerate(info['audio']):
|
||||
language = languages[i]
|
||||
if language and language[0] != 'und':
|
||||
stream['language'] = language[0]
|
||||
if len(languages) == len(info['audio']):
|
||||
for i, stream in enumerate(info['audio']):
|
||||
language = languages[i]
|
||||
if language and language[0] != 'und':
|
||||
stream['language'] = language[0]
|
||||
return info
|
||||
|
||||
return {'path': filename, 'size': 0}
|
||||
|
|
|
@ -4,10 +4,12 @@
|
|||
import re
|
||||
import string
|
||||
from six.moves.html_entities import name2codepoint
|
||||
from six import unichr, PY2
|
||||
from six import unichr, PY2, string_types
|
||||
|
||||
letters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'
|
||||
|
||||
# Configuration for add_links() function
|
||||
|
||||
LEADING_PUNCTUATION = ['(', '<', '<']
|
||||
TRAILING_PUNCTUATION = ['.', ',', ')', '>', '\n', '>', "'", '"']
|
||||
|
||||
|
@ -34,7 +36,7 @@ def escape(html):
|
|||
>>> escape('html "test" & <brothers>')
|
||||
'html "test" & <brothers>'
|
||||
'''
|
||||
if not isinstance(html, basestring):
|
||||
if not isinstance(html, string_types):
|
||||
html = str(html)
|
||||
return html.replace('&', '&').replace('<', '<').replace('>', '>').replace('"', '"').replace("'", ''')
|
||||
|
||||
|
@ -89,7 +91,7 @@ def add_links(text, trim_url_limit=None, nofollow=False):
|
|||
if match:
|
||||
lead, middle, trail = match.groups()
|
||||
if middle.startswith('www.') or ('@' not in middle and not middle.startswith('http://') and \
|
||||
len(middle) > 0 and middle[0] in string.letters + string.digits and \
|
||||
len(middle) > 0 and middle[0] in letters + string.digits and \
|
||||
(middle.endswith('.org') or middle.endswith('.net') or middle.endswith('.com'))):
|
||||
middle = '<a href="http://%s"%s>%s</a>' % (middle, nofollow_attr, trim_url(middle))
|
||||
if middle.startswith('http://') or middle.startswith('https://'):
|
||||
|
@ -205,21 +207,29 @@ def sanitize_html(html, tags=None, global_attributes=[]):
|
|||
>>> sanitize_html('<a href="http://foo.com" onmouseover="alert()">foo</a>')
|
||||
u'<a href="http://foo.com">foo</a>'
|
||||
>>> sanitize_html('<a href="javascript:alert()">foo</a>')
|
||||
u'<a href="javascript:alert()">foo'
|
||||
u'<a href="javascript:alert()">foo</a>'
|
||||
>>> sanitize_html('[http://foo.com foo]')
|
||||
u'<a href="http://foo.com">foo</a>'
|
||||
>>> sanitize_html('<div style="direction: rtl">foo</div>')
|
||||
u'<div style="direction: rtl">foo</div>'
|
||||
>>> sanitize_html('<script>alert()</script>')
|
||||
u'<script>alert()</script>'
|
||||
>>> sanitize_html("'foo' < 'bar' && \"foo\" > \"bar\"")
|
||||
u'\'foo\' < \'bar\' && "foo" > "bar"'
|
||||
>>> sanitize_html("'foo' < 'bar' && \\"foo\\" > \\"bar\\"")
|
||||
u'\\'foo\\' < \\'bar\\' && "foo" > "bar"'
|
||||
>>> sanitize_html('<b>foo')
|
||||
u'<b>foo</b>'
|
||||
>>> sanitize_html('<b>foo</b></b>')
|
||||
u'<b>foo</b>'
|
||||
>>> sanitize_html('Anniversary of Daoud's Republic')
|
||||
u"Anniversary of Daoud's Republic"
|
||||
>>> sanitize_html('')
|
||||
u''
|
||||
>>> sanitize_html(' ')
|
||||
u' '
|
||||
>>> sanitize_html(u' ') # canonicalised to a space: okay, I suppose
|
||||
u' '
|
||||
>>> sanitize_html(u'\u00a0') # also nbsp
|
||||
u' '
|
||||
'''
|
||||
if not tags:
|
||||
valid_url = '^((https?:\/\/|\/|mailto:).*?)'
|
||||
|
@ -393,13 +403,38 @@ def split_tags(string):
|
|||
return [item for sublist in zip(strings, tags) for item in sublist][:-1]
|
||||
|
||||
def sanitize_fragment(html):
|
||||
'''
|
||||
Ensures that tags are closed (or not, as appropriate), attributes
|
||||
are quoted, etc. Does not strip potentially-malicious HTML: use
|
||||
sanitize_html() for that.
|
||||
|
||||
>>> sanitize_fragment(u'<span lang="en">')
|
||||
u'<span lang="en"></span>'
|
||||
>>> sanitize_fragment(u'<span lang=en></span>')
|
||||
u'<span lang="en"></span>'
|
||||
>>> sanitize_fragment(u'<br><br/></br>')
|
||||
u'<br><br>'
|
||||
>>> sanitize_fragment(u'<a href="javascript:alert()">foo</a>')
|
||||
u'<a href="javascript:alert()">foo</a>'
|
||||
>>> sanitize_fragment(u'')
|
||||
u''
|
||||
>>> sanitize_fragment(u' ')
|
||||
u' '
|
||||
>>> sanitize_fragment(u' ')
|
||||
u'\\xa0'
|
||||
>>> sanitize_fragment(u'\\u00a0') # nbsp
|
||||
u'\\xa0'
|
||||
>>> sanitize_fragment(u'\\ufeff') # zero-width no-break space
|
||||
u'\\ufeff'
|
||||
'''
|
||||
|
||||
'''
|
||||
#html5lib reorders arguments, so not usable
|
||||
import html5lib
|
||||
return html5lib.parseFragment(html).toxml().decode('utf-8')
|
||||
'''
|
||||
if not html:
|
||||
return u''
|
||||
if not html.strip():
|
||||
return html
|
||||
import lxml.html
|
||||
body = lxml.html.document_fromstring(html).find('body')
|
||||
html = lxml.html.tostring(body, encoding='utf-8')[6:-7].decode('utf-8')
|
||||
|
|
|
@ -4,6 +4,9 @@
|
|||
import re
|
||||
import unicodedata
|
||||
|
||||
from six import string_types
|
||||
|
||||
|
||||
_articles = ('the', 'la', 'a', 'die', 'der', 'le', 'el',
|
||||
"l'", 'il', 'das', 'les', 'o', 'ein', 'i', 'un', 'los', 'de',
|
||||
'an', 'una', 'las', 'eine', 'den', 'gli', 'het', 'os', 'lo',
|
||||
|
@ -95,7 +98,7 @@ def normalize_imdbid(imdbId):
|
|||
>>> normalize_imdbid('tt0159206')
|
||||
'0159206'
|
||||
"""
|
||||
if isinstance(imdbId, basestring):
|
||||
if isinstance(imdbId, string_types):
|
||||
imdbId = re.sub('.*(\d{7}).*', '\\1', imdbId)
|
||||
elif isinstance(imdbId, int):
|
||||
imdbId = "%07d" % imdbId
|
||||
|
|
|
@ -3,6 +3,8 @@
|
|||
from .. import cache
|
||||
from ..utils import json
|
||||
|
||||
from six import string_types
|
||||
|
||||
def get_id(url):
|
||||
return url.split("/")[-1]
|
||||
|
||||
|
@ -19,7 +21,7 @@ def get_data(id):
|
|||
data[key] = details['metadata'][key]
|
||||
if isinstance(data[key], list):
|
||||
data[key] = data[key][0]
|
||||
if isinstance(data[key], basestring):
|
||||
if isinstance(data[key], string_types):
|
||||
data[key] = data[key].strip()
|
||||
if data[key][0] == '[' and data[key][-1] == ']':
|
||||
data[key] = data[key][1:-1]
|
||||
|
|
|
@ -5,6 +5,7 @@ from __future__ import print_function
|
|||
import re
|
||||
|
||||
from six.moves import urllib
|
||||
from six import string_types
|
||||
|
||||
from ox.utils import json
|
||||
from ox.cache import read_url
|
||||
|
@ -68,7 +69,7 @@ def get_movie_data(wikipedia_url):
|
|||
value = value.split('<br>')
|
||||
if value:
|
||||
if key in filmbox:
|
||||
if isinstance(value, list) and isinstance(filmbox[key], basestring):
|
||||
if isinstance(value, list) and isinstance(filmbox[key], string_types):
|
||||
filmbox[key] = [filmbox[key]] + value
|
||||
else:
|
||||
filmbox[key] += value
|
||||
|
|
|
@ -37,6 +37,7 @@ import plistlib
|
|||
import email.parser
|
||||
import tempfile
|
||||
import textwrap
|
||||
import itertools
|
||||
from pkgutil import get_importer
|
||||
|
||||
try:
|
||||
|
@ -53,6 +54,8 @@ if PY3:
|
|||
|
||||
if PY2:
|
||||
from urlparse import urlparse, urlunparse
|
||||
filter = itertools.ifilter
|
||||
map = itertools.imap
|
||||
|
||||
if PY3:
|
||||
string_types = str,
|
||||
|
@ -1534,7 +1537,7 @@ class MarkerEvaluation(object):
|
|||
"""
|
||||
return dict(
|
||||
(key.replace('.', '_'), value)
|
||||
for key, value in env
|
||||
for key, value in env.items()
|
||||
)
|
||||
|
||||
@classmethod
|
||||
|
@ -1716,7 +1719,7 @@ class EggProvider(NullProvider):
|
|||
path = self.module_path
|
||||
old = None
|
||||
while path!=old:
|
||||
if path.lower().endswith('.egg'):
|
||||
if _is_unpacked_egg(path):
|
||||
self.egg_name = os.path.basename(path)
|
||||
self.egg_info = os.path.join(path, 'EGG-INFO')
|
||||
self.egg_root = path
|
||||
|
@ -2014,11 +2017,11 @@ class FileMetadata(EmptyProvider):
|
|||
self.path = path
|
||||
|
||||
def has_metadata(self, name):
|
||||
return name=='PKG-INFO'
|
||||
return name=='PKG-INFO' and os.path.isfile(self.path)
|
||||
|
||||
def get_metadata(self, name):
|
||||
if name=='PKG-INFO':
|
||||
with open(self.path,'rU') as f:
|
||||
with io.open(self.path, encoding='utf-8') as f:
|
||||
metadata = f.read()
|
||||
return metadata
|
||||
raise KeyError("No metadata except PKG-INFO is available")
|
||||
|
@ -2099,7 +2102,7 @@ def find_eggs_in_zip(importer, path_item, only=False):
|
|||
# don't yield nested distros
|
||||
return
|
||||
for subitem in metadata.resource_listdir('/'):
|
||||
if subitem.endswith('.egg'):
|
||||
if _is_unpacked_egg(subitem):
|
||||
subpath = os.path.join(path_item, subitem)
|
||||
for dist in find_eggs_in_zip(zipimport.zipimporter(subpath), subpath):
|
||||
yield dist
|
||||
|
@ -2115,8 +2118,7 @@ def find_on_path(importer, path_item, only=False):
|
|||
path_item = _normalize_cached(path_item)
|
||||
|
||||
if os.path.isdir(path_item) and os.access(path_item, os.R_OK):
|
||||
if path_item.lower().endswith('.egg'):
|
||||
# unpacked egg
|
||||
if _is_unpacked_egg(path_item):
|
||||
yield Distribution.from_filename(
|
||||
path_item, metadata=PathMetadata(
|
||||
path_item, os.path.join(path_item,'EGG-INFO')
|
||||
|
@ -2136,7 +2138,7 @@ def find_on_path(importer, path_item, only=False):
|
|||
yield Distribution.from_location(
|
||||
path_item, entry, metadata, precedence=DEVELOP_DIST
|
||||
)
|
||||
elif not only and lower.endswith('.egg'):
|
||||
elif not only and _is_unpacked_egg(entry):
|
||||
dists = find_distributions(os.path.join(path_item, entry))
|
||||
for dist in dists:
|
||||
yield dist
|
||||
|
@ -2283,6 +2285,14 @@ def _normalize_cached(filename, _cache={}):
|
|||
_cache[filename] = result = normalize_path(filename)
|
||||
return result
|
||||
|
||||
def _is_unpacked_egg(path):
|
||||
"""
|
||||
Determine if given path appears to be an unpacked egg.
|
||||
"""
|
||||
return (
|
||||
path.lower().endswith('.egg')
|
||||
)
|
||||
|
||||
def _set_parent_ns(packageName):
|
||||
parts = packageName.split('.')
|
||||
name = parts.pop()
|
||||
|
@ -2466,6 +2476,18 @@ def _remove_md5_fragment(location):
|
|||
return location
|
||||
|
||||
|
||||
def _version_from_file(lines):
|
||||
"""
|
||||
Given an iterable of lines from a Metadata file, return
|
||||
the value of the Version field, if present, or None otherwise.
|
||||
"""
|
||||
is_version_line = lambda line: line.lower().startswith('version:')
|
||||
version_lines = filter(is_version_line, lines)
|
||||
line = next(iter(version_lines), '')
|
||||
_, _, value = line.partition(':')
|
||||
return safe_version(value.strip()) or None
|
||||
|
||||
|
||||
class Distribution(object):
|
||||
"""Wrap an actual or potential sys.path entry w/metadata"""
|
||||
PKG_INFO = 'PKG-INFO'
|
||||
|
@ -2483,21 +2505,24 @@ class Distribution(object):
|
|||
self._provider = metadata or empty_provider
|
||||
|
||||
@classmethod
|
||||
def from_location(cls, location, basename, metadata=None,**kw):
|
||||
def from_location(cls, location, basename, metadata=None, **kw):
|
||||
project_name, version, py_version, platform = [None]*4
|
||||
basename, ext = os.path.splitext(basename)
|
||||
if ext.lower() in _distributionImpl:
|
||||
# .dist-info gets much metadata differently
|
||||
cls = _distributionImpl[ext.lower()]
|
||||
|
||||
match = EGG_NAME(basename)
|
||||
if match:
|
||||
project_name, version, py_version, platform = match.group(
|
||||
'name','ver','pyver','plat'
|
||||
'name', 'ver', 'pyver', 'plat'
|
||||
)
|
||||
cls = _distributionImpl[ext.lower()]
|
||||
return cls(
|
||||
location, metadata, project_name=project_name, version=version,
|
||||
py_version=py_version, platform=platform, **kw
|
||||
)
|
||||
)._reload_version()
|
||||
|
||||
def _reload_version(self):
|
||||
return self
|
||||
|
||||
@property
|
||||
def hashcmp(self):
|
||||
|
@ -2584,13 +2609,11 @@ class Distribution(object):
|
|||
try:
|
||||
return self._version
|
||||
except AttributeError:
|
||||
for line in self._get_metadata(self.PKG_INFO):
|
||||
if line.lower().startswith('version:'):
|
||||
self._version = safe_version(line.split(':',1)[1].strip())
|
||||
return self._version
|
||||
else:
|
||||
version = _version_from_file(self._get_metadata(self.PKG_INFO))
|
||||
if version is None:
|
||||
tmpl = "Missing 'Version:' header and/or %s file"
|
||||
raise ValueError(tmpl % self.PKG_INFO, self)
|
||||
return version
|
||||
|
||||
@property
|
||||
def _dep_map(self):
|
||||
|
@ -2795,6 +2818,26 @@ class Distribution(object):
|
|||
return [dep for dep in self._dep_map if dep]
|
||||
|
||||
|
||||
class EggInfoDistribution(Distribution):
|
||||
|
||||
def _reload_version(self):
|
||||
"""
|
||||
Packages installed by distutils (e.g. numpy or scipy),
|
||||
which uses an old safe_version, and so
|
||||
their version numbers can get mangled when
|
||||
converted to filenames (e.g., 1.11.0.dev0+2329eae to
|
||||
1.11.0.dev0_2329eae). These distributions will not be
|
||||
parsed properly
|
||||
downstream by Distribution and safe_version, so
|
||||
take an extra step and try to get the version number from
|
||||
the metadata file itself instead of the filename.
|
||||
"""
|
||||
md_version = _version_from_file(self._get_metadata(self.PKG_INFO))
|
||||
if md_version:
|
||||
self._version = md_version
|
||||
return self
|
||||
|
||||
|
||||
class DistInfoDistribution(Distribution):
|
||||
"""Wrap an actual or potential sys.path entry w/metadata, .dist-info style"""
|
||||
PKG_INFO = 'METADATA'
|
||||
|
@ -2860,7 +2903,7 @@ class DistInfoDistribution(Distribution):
|
|||
|
||||
_distributionImpl = {
|
||||
'.egg': Distribution,
|
||||
'.egg-info': Distribution,
|
||||
'.egg-info': EggInfoDistribution,
|
||||
'.dist-info': DistInfoDistribution,
|
||||
}
|
||||
|
||||
|
|
|
@ -83,81 +83,81 @@ requests-2.3.0.dist-info/pydist.json,sha256=7nySdPrVYYyJK2C3cPlHJr1oSZ_-lFiBlp9D
|
|||
requests-2.3.0.dist-info/RECORD,,
|
||||
requests-2.3.0.dist-info/top_level.txt,sha256=fMSVmHfb5rbGOo6xv-O_tUX6j-WyixssE-SnwcDRxNQ,9
|
||||
requests-2.3.0.dist-info/WHEEL,sha256=SXYYsi-y-rEGIva8sB8iKF6bAFD6YDhmqHX5hI3fc0o,110
|
||||
requests/packages/urllib3/util/__pycache__/url.cpython-34.pyc,,
|
||||
requests/packages/chardet/__pycache__/utf8prober.cpython-34.pyc,,
|
||||
requests/__pycache__/sessions.cpython-34.pyc,,
|
||||
requests/packages/urllib3/util/__pycache__/request.cpython-34.pyc,,
|
||||
requests/packages/chardet/__pycache__/latin1prober.cpython-34.pyc,,
|
||||
requests/packages/chardet/__pycache__/eucjpprober.cpython-34.pyc,,
|
||||
requests/__pycache__/certs.cpython-34.pyc,,
|
||||
requests/packages/urllib3/util/__pycache__/response.cpython-34.pyc,,
|
||||
requests/packages/urllib3/__pycache__/__init__.cpython-34.pyc,,
|
||||
requests/packages/chardet/__pycache__/universaldetector.cpython-34.pyc,,
|
||||
requests/packages/chardet/__pycache__/gb2312freq.cpython-34.pyc,,
|
||||
requests/packages/chardet/__pycache__/cp949prober.cpython-34.pyc,,
|
||||
requests/packages/urllib3/util/__pycache__/ssl_.cpython-34.pyc,,
|
||||
requests/__pycache__/api.cpython-34.pyc,,
|
||||
requests/__pycache__/adapters.cpython-34.pyc,,
|
||||
requests/packages/urllib3/packages/ssl_match_hostname/__pycache__/_implementation.cpython-34.pyc,,
|
||||
requests/packages/chardet/__pycache__/hebrewprober.cpython-34.pyc,,
|
||||
requests/packages/urllib3/__pycache__/connectionpool.cpython-34.pyc,,
|
||||
requests/packages/urllib3/__pycache__/_collections.cpython-34.pyc,,
|
||||
requests/packages/chardet/__pycache__/escprober.cpython-34.pyc,,
|
||||
requests/packages/urllib3/__pycache__/fields.cpython-34.pyc,,
|
||||
requests/packages/chardet/__pycache__/euctwfreq.cpython-34.pyc,,
|
||||
requests/packages/chardet/__pycache__/gb2312prober.cpython-34.pyc,,
|
||||
requests/packages/urllib3/__pycache__/response.cpython-34.pyc,,
|
||||
requests/__pycache__/__init__.cpython-34.pyc,,
|
||||
requests/packages/chardet/__pycache__/euckrfreq.cpython-34.pyc,,
|
||||
requests/packages/urllib3/__pycache__/connection.cpython-34.pyc,,
|
||||
requests/packages/chardet/__pycache__/langhebrewmodel.cpython-34.pyc,,
|
||||
requests/packages/urllib3/__pycache__/poolmanager.cpython-34.pyc,,
|
||||
requests/packages/urllib3/contrib/__pycache__/pyopenssl.cpython-34.pyc,,
|
||||
requests/__pycache__/status_codes.cpython-34.pyc,,
|
||||
requests/packages/urllib3/util/__pycache__/__init__.cpython-34.pyc,,
|
||||
requests/__pycache__/compat.cpython-34.pyc,,
|
||||
requests/packages/chardet/__pycache__/mbcharsetprober.cpython-34.pyc,,
|
||||
requests/packages/chardet/__pycache__/sbcsgroupprober.cpython-34.pyc,,
|
||||
requests/packages/chardet/__pycache__/jpcntx.cpython-34.pyc,,
|
||||
requests/packages/chardet/__pycache__/langthaimodel.cpython-34.pyc,,
|
||||
requests/packages/chardet/__pycache__/constants.cpython-34.pyc,,
|
||||
requests/__pycache__/exceptions.cpython-34.pyc,,
|
||||
requests/packages/chardet/__pycache__/escsm.cpython-34.pyc,,
|
||||
requests/packages/chardet/__pycache__/__init__.cpython-34.pyc,,
|
||||
requests/packages/chardet/__pycache__/langcyrillicmodel.cpython-34.pyc,,
|
||||
requests/packages/urllib3/__pycache__/filepost.cpython-34.pyc,,
|
||||
requests/packages/chardet/__pycache__/jisfreq.cpython-34.pyc,,
|
||||
requests/packages/chardet/__pycache__/euctwprober.cpython-34.pyc,,
|
||||
requests/packages/urllib3/__pycache__/exceptions.cpython-34.pyc,,
|
||||
requests/packages/urllib3/packages/__pycache__/__init__.cpython-34.pyc,,
|
||||
requests/packages/chardet/__pycache__/sjisprober.cpython-34.pyc,,
|
||||
requests/packages/chardet/__pycache__/mbcsgroupprober.cpython-34.pyc,,
|
||||
requests/packages/chardet/__pycache__/charsetgroupprober.cpython-34.pyc,,
|
||||
requests/packages/urllib3/contrib/__pycache__/__init__.cpython-34.pyc,,
|
||||
requests/__pycache__/structures.cpython-34.pyc,,
|
||||
requests/packages/chardet/__pycache__/mbcssm.cpython-34.pyc,,
|
||||
requests/packages/chardet/__pycache__/chardetect.cpython-34.pyc,,
|
||||
requests/packages/chardet/__pycache__/sbcharsetprober.cpython-34.pyc,,
|
||||
requests/packages/chardet/__pycache__/langbulgarianmodel.cpython-34.pyc,,
|
||||
requests/packages/urllib3/util/__pycache__/connection.cpython-34.pyc,,
|
||||
requests/__pycache__/auth.cpython-34.pyc,,
|
||||
requests/packages/chardet/__pycache__/langhungarianmodel.cpython-34.pyc,,
|
||||
requests/__pycache__/cookies.cpython-34.pyc,,
|
||||
requests/packages/chardet/__pycache__/compat.cpython-34.pyc,,
|
||||
requests/packages/urllib3/util/__pycache__/url.cpython-34.pyc,,
|
||||
requests/packages/chardet/__pycache__/langgreekmodel.cpython-34.pyc,,
|
||||
requests/packages/chardet/__pycache__/charsetprober.cpython-34.pyc,,
|
||||
requests/packages/urllib3/__pycache__/request.cpython-34.pyc,,
|
||||
requests/packages/urllib3/util/__pycache__/timeout.cpython-34.pyc,,
|
||||
requests/packages/urllib3/packages/__pycache__/six.cpython-34.pyc,,
|
||||
requests/packages/chardet/__pycache__/euckrprober.cpython-34.pyc,,
|
||||
requests/packages/chardet/__pycache__/chardistribution.cpython-34.pyc,,
|
||||
requests/packages/chardet/__pycache__/escsm.cpython-34.pyc,,
|
||||
requests/__pycache__/adapters.cpython-34.pyc,,
|
||||
requests/packages/chardet/__pycache__/euckrfreq.cpython-34.pyc,,
|
||||
requests/packages/chardet/__pycache__/big5freq.cpython-34.pyc,,
|
||||
requests/packages/chardet/__pycache__/langbulgarianmodel.cpython-34.pyc,,
|
||||
requests/packages/chardet/__pycache__/utf8prober.cpython-34.pyc,,
|
||||
requests/packages/urllib3/util/__pycache__/__init__.cpython-34.pyc,,
|
||||
requests/__pycache__/auth.cpython-34.pyc,,
|
||||
requests/packages/chardet/__pycache__/mbcsgroupprober.cpython-34.pyc,,
|
||||
requests/packages/chardet/__pycache__/euctwprober.cpython-34.pyc,,
|
||||
requests/packages/urllib3/contrib/__pycache__/pyopenssl.cpython-34.pyc,,
|
||||
requests/packages/__pycache__/__init__.cpython-34.pyc,,
|
||||
requests/__pycache__/models.cpython-34.pyc,,
|
||||
requests/packages/chardet/__pycache__/big5prober.cpython-34.pyc,,
|
||||
requests/packages/urllib3/contrib/__pycache__/ntlmpool.cpython-34.pyc,,
|
||||
requests/packages/urllib3/packages/__pycache__/ordered_dict.cpython-34.pyc,,
|
||||
requests/packages/urllib3/__pycache__/response.cpython-34.pyc,,
|
||||
requests/packages/urllib3/util/__pycache__/request.cpython-34.pyc,,
|
||||
requests/packages/chardet/__pycache__/eucjpprober.cpython-34.pyc,,
|
||||
requests/__pycache__/api.cpython-34.pyc,,
|
||||
requests/__pycache__/sessions.cpython-34.pyc,,
|
||||
requests/packages/urllib3/contrib/__pycache__/__init__.cpython-34.pyc,,
|
||||
requests/packages/chardet/__pycache__/jisfreq.cpython-34.pyc,,
|
||||
requests/__pycache__/exceptions.cpython-34.pyc,,
|
||||
requests/packages/urllib3/util/__pycache__/connection.cpython-34.pyc,,
|
||||
requests/packages/urllib3/packages/__pycache__/__init__.cpython-34.pyc,,
|
||||
requests/packages/chardet/__pycache__/chardistribution.cpython-34.pyc,,
|
||||
requests/__pycache__/utils.cpython-34.pyc,,
|
||||
requests/packages/urllib3/__pycache__/request.cpython-34.pyc,,
|
||||
requests/packages/chardet/__pycache__/mbcssm.cpython-34.pyc,,
|
||||
requests/packages/chardet/__pycache__/langthaimodel.cpython-34.pyc,,
|
||||
requests/packages/chardet/__pycache__/latin1prober.cpython-34.pyc,,
|
||||
requests/__pycache__/structures.cpython-34.pyc,,
|
||||
requests/packages/urllib3/contrib/__pycache__/ntlmpool.cpython-34.pyc,,
|
||||
requests/packages/urllib3/__pycache__/filepost.cpython-34.pyc,,
|
||||
requests/__pycache__/models.cpython-34.pyc,,
|
||||
requests/packages/chardet/__pycache__/sjisprober.cpython-34.pyc,,
|
||||
requests/__pycache__/__init__.cpython-34.pyc,,
|
||||
requests/packages/urllib3/util/__pycache__/ssl_.cpython-34.pyc,,
|
||||
requests/__pycache__/status_codes.cpython-34.pyc,,
|
||||
requests/packages/urllib3/__pycache__/poolmanager.cpython-34.pyc,,
|
||||
requests/packages/chardet/__pycache__/jpcntx.cpython-34.pyc,,
|
||||
requests/packages/chardet/__pycache__/codingstatemachine.cpython-34.pyc,,
|
||||
requests/packages/urllib3/__pycache__/connection.cpython-34.pyc,,
|
||||
requests/packages/chardet/__pycache__/universaldetector.cpython-34.pyc,,
|
||||
requests/packages/chardet/__pycache__/langhungarianmodel.cpython-34.pyc,,
|
||||
requests/packages/urllib3/util/__pycache__/timeout.cpython-34.pyc,,
|
||||
requests/packages/urllib3/__pycache__/__init__.cpython-34.pyc,,
|
||||
requests/packages/chardet/__pycache__/sbcsgroupprober.cpython-34.pyc,,
|
||||
requests/packages/urllib3/packages/ssl_match_hostname/__pycache__/_implementation.cpython-34.pyc,,
|
||||
requests/packages/urllib3/__pycache__/exceptions.cpython-34.pyc,,
|
||||
requests/packages/chardet/__pycache__/gb2312freq.cpython-34.pyc,,
|
||||
requests/packages/urllib3/util/__pycache__/response.cpython-34.pyc,,
|
||||
requests/packages/chardet/__pycache__/euckrprober.cpython-34.pyc,,
|
||||
requests/packages/chardet/__pycache__/escprober.cpython-34.pyc,,
|
||||
requests/packages/chardet/__pycache__/gb2312prober.cpython-34.pyc,,
|
||||
requests/packages/chardet/__pycache__/charsetgroupprober.cpython-34.pyc,,
|
||||
requests/__pycache__/hooks.cpython-34.pyc,,
|
||||
requests/packages/chardet/__pycache__/__init__.cpython-34.pyc,,
|
||||
requests/packages/chardet/__pycache__/charsetprober.cpython-34.pyc,,
|
||||
requests/packages/chardet/__pycache__/compat.cpython-34.pyc,,
|
||||
requests/packages/chardet/__pycache__/sbcharsetprober.cpython-34.pyc,,
|
||||
requests/__pycache__/certs.cpython-34.pyc,,
|
||||
requests/packages/chardet/__pycache__/langhebrewmodel.cpython-34.pyc,,
|
||||
requests/packages/chardet/__pycache__/mbcharsetprober.cpython-34.pyc,,
|
||||
requests/packages/chardet/__pycache__/chardetect.cpython-34.pyc,,
|
||||
requests/packages/chardet/__pycache__/constants.cpython-34.pyc,,
|
||||
requests/packages/chardet/__pycache__/big5prober.cpython-34.pyc,,
|
||||
requests/packages/urllib3/packages/__pycache__/ordered_dict.cpython-34.pyc,,
|
||||
requests/packages/urllib3/__pycache__/_collections.cpython-34.pyc,,
|
||||
requests/packages/chardet/__pycache__/euctwfreq.cpython-34.pyc,,
|
||||
requests/packages/urllib3/packages/ssl_match_hostname/__pycache__/__init__.cpython-34.pyc,,
|
||||
requests/packages/urllib3/packages/__pycache__/six.cpython-34.pyc,,
|
||||
requests/packages/chardet/__pycache__/hebrewprober.cpython-34.pyc,,
|
||||
requests/__pycache__/compat.cpython-34.pyc,,
|
||||
requests/packages/chardet/__pycache__/langcyrillicmodel.cpython-34.pyc,,
|
||||
requests/packages/urllib3/__pycache__/connectionpool.cpython-34.pyc,,
|
||||
requests/packages/urllib3/__pycache__/fields.cpython-34.pyc,,
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
Metadata-Version: 2.0
|
||||
Name: setuptools
|
||||
Version: 18.5
|
||||
Version: 19.1.1
|
||||
Summary: Easily download, build, install, upgrade, and uninstall Python packages
|
||||
Home-page: https://bitbucket.org/pypa/setuptools
|
||||
Author: Python Packaging Authority
|
||||
|
@ -24,7 +24,7 @@ Classifier: Topic :: System :: Archiving :: Packaging
|
|||
Classifier: Topic :: System :: Systems Administration
|
||||
Classifier: Topic :: Utilities
|
||||
Provides-Extra: certs
|
||||
Requires-Dist: certifi (==2015.04.28); extra == 'certs'
|
||||
Requires-Dist: certifi (==2015.11.20); extra == 'certs'
|
||||
Provides-Extra: ssl
|
||||
Requires-Dist: wincertstore (==0.2); sys_platform=='win32' and extra == 'ssl'
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
easy_install.py,sha256=MDC9vt5AxDsXX5qcKlBz2TnW6Tpuv_AobnfhCJ9X3PM,126
|
||||
_markerlib/__init__.py,sha256=GSmhZqvAitLJHhSgtqqusfq2nJ_ClP3oy3Lm0uZLIsU,552
|
||||
_markerlib/markers.py,sha256=YuFp0-osufFIoqnzG3L0Z2fDCx4Vln3VUDeXJ2DA_1I,3979
|
||||
pkg_resources/__init__.py,sha256=HXzgG0K1DI6hcI-gkMYoq6hPsoERSezP32FMP0Hxt00,106833
|
||||
pkg_resources/__init__.py,sha256=Qmu5yFnjgvlaUsVhYf1qXLCF8cnl3Wau-uBM2GSiNyk,108158
|
||||
pkg_resources/_vendor/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
||||
pkg_resources/_vendor/packaging/__about__.py,sha256=YzdrW-1lWmyCBDyrcNkZbJo4tiDWXpoiqPjfyCYMzIE,1073
|
||||
pkg_resources/_vendor/packaging/__init__.py,sha256=2V8n-eEpSgBuXlV8hlMmhU7ZklpsrrusWMZNp2gC4Hs,906
|
||||
|
@ -15,9 +15,9 @@ setuptools/cli-32.exe,sha256=dfEuovMNnA2HLa3jRfMPVi5tk4R7alCbpTvuxtCyw0Y,65536
|
|||
setuptools/cli-64.exe,sha256=KLABu5pyrnokJCv6skjXZ6GsXeyYHGcqOUT3oHI3Xpo,74752
|
||||
setuptools/cli-arm-32.exe,sha256=0pFNIi2SmY2gdY91Y4LRhj1wuBsnv5cG1fus3iBJv40,69120
|
||||
setuptools/cli.exe,sha256=dfEuovMNnA2HLa3jRfMPVi5tk4R7alCbpTvuxtCyw0Y,65536
|
||||
setuptools/compat.py,sha256=-Hl58PuLOEHUDM3-qsgmk50qNiyLLF3RgBgJ-eGGZG0,2094
|
||||
setuptools/compat.py,sha256=yIczq-iP7D0AfJ7SiCCzxs0EyTBRUhpmrO_twgglfpE,2184
|
||||
setuptools/depends.py,sha256=gMRnrqQSr_Yp_wf09O88vKSQah1YjjEi5PsDNezM2Hs,6370
|
||||
setuptools/dist.py,sha256=alEPOcofbGQSfkVQk6h0yEGNyKiQyCvNQa5YmnUm6wU,35320
|
||||
setuptools/dist.py,sha256=5G-4c8am21GN30Ei4XXXoKbFDndoIbhj4L9pyzJLJc0,35284
|
||||
setuptools/extension.py,sha256=nQ9GFTKxRIwmE1W7t1ZSBmuPAUJK_gVRYOCwxA1L38U,1649
|
||||
setuptools/gui-32.exe,sha256=XBr0bHMA6Hpz2s9s9Bzjl-PwXfa9nH4ie0rFn4V2kWA,65536
|
||||
setuptools/gui-64.exe,sha256=aYKMhX1IJLn4ULHgWX0sE0yREUt6B3TEHf_jOw6yNyE,75264
|
||||
|
@ -25,18 +25,18 @@ setuptools/gui-arm-32.exe,sha256=R5gRWLkY7wvO_CVGxoi7LZVTv0h-DKsKScy6fkbp4XI,691
|
|||
setuptools/gui.exe,sha256=XBr0bHMA6Hpz2s9s9Bzjl-PwXfa9nH4ie0rFn4V2kWA,65536
|
||||
setuptools/lib2to3_ex.py,sha256=6jPF9sJuHiz0cyg4cwIBLl2VMAxcl3GYSZwWAOuJplU,1998
|
||||
setuptools/msvc9_support.py,sha256=fo2vjb-dna1SEuHezQCTuelCo6XFBv5cqaI56ABJ1vw,2187
|
||||
setuptools/package_index.py,sha256=aavWGle1RtmelMjeTOxjFoGpEdGdGY4hfRnLHUkbD0c,38760
|
||||
setuptools/package_index.py,sha256=mMGCMmnPbkQxl0UUDTovDtjswbE1Rvh7uLETw4FVNA8,38963
|
||||
setuptools/py26compat.py,sha256=ggKS8_aZWWHHS792vF3uXp5vmUkGNk3vjLreLTHr_-Q,431
|
||||
setuptools/py27compat.py,sha256=CGj-jZcFgHUkrEdLvArkxHj96tAaMbG2-yJtUVU7QVI,306
|
||||
setuptools/py31compat.py,sha256=O3X_wdWrvXTifeSFbRaCMuc23cDhMHJn7QlITb5cQ8E,1637
|
||||
setuptools/sandbox.py,sha256=Gg5UfpsC5xsg_1x68pWRXG4t3nRWNpTk7m13lrnMTKw,13925
|
||||
setuptools/py31compat.py,sha256=cqYSVBd2pxvKl75185z40htfEr6EKC29KvSBiSoqHOA,1636
|
||||
setuptools/sandbox.py,sha256=8fiWWVTSB6OHu4uC2u6GLo9R6hQFZ1m6XWD_TMSfNu4,14108
|
||||
setuptools/script (dev).tmpl,sha256=f7MR17dTkzaqkCMSVseyOCMVrPVSMdmTQsaB8cZzfuI,201
|
||||
setuptools/script.tmpl,sha256=WGTt5piezO27c-Dbx6l5Q4T3Ff20A5z7872hv3aAhYY,138
|
||||
setuptools/site-patch.py,sha256=K-0-cAx36mX_PG-qPZwosG9ZLCliRjquKQ4nHiJvvzg,2389
|
||||
setuptools/ssl_support.py,sha256=FASqXlRCmXAi6LUWLUIo0u14MpJqHBgkOc5KPHSRrtI,8044
|
||||
setuptools/unicode_utils.py,sha256=gvhAHRj1LELCz-1MP3rfXGi__O1CAm5aksO9Njd2lpU,981
|
||||
setuptools/utils.py,sha256=08Z7mt-9mvrx-XvmS5EyKoRn2lxNTlgFsUwBU3Eq9JQ,293
|
||||
setuptools/version.py,sha256=puctVnBYQ-XKHe7xBHqCJwzHsPjWBWn-FQt0kRDJjEg,21
|
||||
setuptools/version.py,sha256=_aG0a9wDe8nuk6z4mc7vBXS3U-58jm43VVJVRHSpX54,23
|
||||
setuptools/windows_support.py,sha256=5GrfqSP2-dLGJoZTq2g6dCKkyQxxa2n5IQiXlJCoYEE,714
|
||||
setuptools/command/__init__.py,sha256=gQMXoLa0TtUtmUZY0ptSouWWA5kcTArWyDQ6QwkjoVQ,554
|
||||
setuptools/command/alias.py,sha256=1sLQxZcNh6dDQpDmm4G7UGGTol83nY1NTPmNBbm2siI,2381
|
||||
|
@ -44,81 +44,81 @@ setuptools/command/bdist_egg.py,sha256=3eblnHDm1t8Hwh8K5z1QaWOVkxUvxQc40KV_YZVHN
|
|||
setuptools/command/bdist_rpm.py,sha256=B7l0TnzCGb-0nLlm6rS00jWLkojASwVmdhW2w5Qz_Ak,1508
|
||||
setuptools/command/bdist_wininst.py,sha256=_6dz3lpB1tY200LxKPLM7qgwTCceOMgaWFF-jW2-pm0,637
|
||||
setuptools/command/build_ext.py,sha256=pkQ8xp3YPVGGLkGv-SvfxC_GqFpboph1AFEoMFOgQMo,11964
|
||||
setuptools/command/build_py.py,sha256=uTgiBroMgyV-Lq4Kt42PLWQknM9G8c8_6TiDv4H5_Sw,7915
|
||||
setuptools/command/develop.py,sha256=uyRwABU1JnhQhZO9rS8-nenkzLwKKJt2P7WPnsXrHd4,6610
|
||||
setuptools/command/easy_install.py,sha256=_gRt2BDjiJpHuDPJzOFOTThWjspKy7NYIV_Br_PmyB0,87190
|
||||
setuptools/command/egg_info.py,sha256=7AEcwMZQ5zl48_Cu_srTxCUqlJBokW10jRlFHZof2fs,16852
|
||||
setuptools/command/build_py.py,sha256=-45-M8GoefZWI_8smnAChPSjrtriqKJ2DoQM236lrEA,8000
|
||||
setuptools/command/develop.py,sha256=6oN0Qk_g8r29HZHxUvJLqUoZwGV33wg0olv2NnbHo20,7378
|
||||
setuptools/command/easy_install.py,sha256=3j4QGHmaPVbKieKSE8Mvcdn0KyxUFGngay4YFQl0U0Q,87460
|
||||
setuptools/command/egg_info.py,sha256=6F0MRJM78zHM1w7oGwjfDSgVQrbEIBy9MZ4UBsz75dc,16841
|
||||
setuptools/command/install.py,sha256=QwaFiZRU3ytIHoPh8uJ9EqV3Fu9C4ca4B7UGAo95tws,4685
|
||||
setuptools/command/install_egg_info.py,sha256=KXNB8O34-rK-cZZZr2fnT8kqNktDmTfUA88X2Iln66c,4001
|
||||
setuptools/command/install_lib.py,sha256=ntpy-9xiFHfDmXmX_Lfp7nMchw7FpgyP66H7reixI_Y,3771
|
||||
setuptools/command/install_lib.py,sha256=rWcysInRJHVzgneY41EKW3kW3-dR2q2CvyPzul5ASAk,3839
|
||||
setuptools/command/install_scripts.py,sha256=vX2JC6v7l090N7CrTfihWBklNbPvfNKAY2LRtukM9XE,2231
|
||||
setuptools/command/launcher manifest.xml,sha256=xlLbjWrB01tKC0-hlVkOKkiSPbzMml2eOPtJ_ucCnbE,628
|
||||
setuptools/command/register.py,sha256=bHlMm1qmBbSdahTOT8w6UhA-EgeQIz7p6cD-qOauaiI,270
|
||||
setuptools/command/rotate.py,sha256=Qm7SOa32L9XG5b_C7_SSYvKM5rqFXroeQ6w8GXIsY2o,2038
|
||||
setuptools/command/saveopts.py,sha256=za7QCBcQimKKriWcoCcbhxPjUz30gSB74zuTL47xpP4,658
|
||||
setuptools/command/sdist.py,sha256=rMT2qS0u4GYJtL4IXiYG-ElEa111wqzQVHpv9uE1L5w,7079
|
||||
setuptools/command/setopt.py,sha256=Z3_kav60D2XHZjM0cRhGo7wbBYo7nr4U_U-wMMbpmu8,5080
|
||||
setuptools/command/test.py,sha256=yJEniqTzav6R6vimRG3tb7l233rGDSAmFafXIHe9UzU,6562
|
||||
setuptools/command/sdist.py,sha256=xfVHruP1ygEEIlEXFt_MVc-ioddWNIsPn14s-p2SJWE,7045
|
||||
setuptools/command/setopt.py,sha256=YUCWgxtCMWQOCylInD8LQyz2mDH_JT_dSiSlpHO4hns,5080
|
||||
setuptools/command/test.py,sha256=FfVBAAOSd0aINt2WQuyk3oH_mFRssIym1lxLO3zqlIg,6835
|
||||
setuptools/command/upload_docs.py,sha256=di-XRGtxW5TSFYR6nK9XZj3I5JIU4V00SOFRhptdOGc,6782
|
||||
setuptools-18.5.dist-info/DESCRIPTION.rst,sha256=MDsJej8DPV2OKpAKpu74g-2xksRd-uGTeZn4W7D1dnI,9940
|
||||
setuptools-18.5.dist-info/METADATA,sha256=AnJr1ZA0xypJknGm_uX312zkByzCrA6_ZyjZDI0d408,11256
|
||||
setuptools-18.5.dist-info/RECORD,,
|
||||
setuptools-18.5.dist-info/WHEEL,sha256=GrqQvamwgBV4nLoJe0vhYRSWzWsx7xjlt74FT0SWYfE,110
|
||||
setuptools-18.5.dist-info/dependency_links.txt,sha256=g1tkmtmOY1n1KRGVLZKBtbJf0CCZ2Jil8uGvMfQRJNE,226
|
||||
setuptools-18.5.dist-info/entry_points.txt,sha256=xrrbAWSD2o_blM5eb2oXvmCTvfdcjUMunUT4T8C-AAs,2793
|
||||
setuptools-18.5.dist-info/metadata.json,sha256=kuSZ-oLefqfph4-5BoCXPJKfOx98Dz9L4EgOJ08ZZl0,4678
|
||||
setuptools-18.5.dist-info/top_level.txt,sha256=7780fzudMJkykiTcIrAQ8m8Lll6kot3EEePye3VJgEE,49
|
||||
setuptools-18.5.dist-info/zip-safe,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
|
||||
setuptools-19.1.1.dist-info/DESCRIPTION.rst,sha256=MDsJej8DPV2OKpAKpu74g-2xksRd-uGTeZn4W7D1dnI,9940
|
||||
setuptools-19.1.1.dist-info/METADATA,sha256=xlRSO49pP5t_8vahC3aRgPiMKTzVbvDeG5me1gT8chc,11258
|
||||
setuptools-19.1.1.dist-info/RECORD,,
|
||||
setuptools-19.1.1.dist-info/WHEEL,sha256=GrqQvamwgBV4nLoJe0vhYRSWzWsx7xjlt74FT0SWYfE,110
|
||||
setuptools-19.1.1.dist-info/dependency_links.txt,sha256=oUNXJEArClXFiSSvfFwUKY8TYjeIXhuFfCpXn5K0DCE,226
|
||||
setuptools-19.1.1.dist-info/entry_points.txt,sha256=xrrbAWSD2o_blM5eb2oXvmCTvfdcjUMunUT4T8C-AAs,2793
|
||||
setuptools-19.1.1.dist-info/metadata.json,sha256=e784uoVY91JB3h1b5vAtbY_cAZQ66TwCO52dW69jGrM,4688
|
||||
setuptools-19.1.1.dist-info/top_level.txt,sha256=7780fzudMJkykiTcIrAQ8m8Lll6kot3EEePye3VJgEE,49
|
||||
setuptools-19.1.1.dist-info/zip-safe,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
|
||||
/srv/openmedialibrary/platform/Shared/home/.local/bin/easy_install,sha256=7h7lc5DCAhnE08UwEm49wGymGDGdOcrkRdncTKYmXIQ,233
|
||||
/srv/openmedialibrary/platform/Shared/home/.local/bin/easy_install-3.4,sha256=7h7lc5DCAhnE08UwEm49wGymGDGdOcrkRdncTKYmXIQ,233
|
||||
_markerlib/__pycache__/markers.cpython-34.pyc,,
|
||||
setuptools/command/__pycache__/setopt.cpython-34.pyc,,
|
||||
setuptools/command/__pycache__/alias.cpython-34.pyc,,
|
||||
setuptools/__pycache__/sandbox.cpython-34.pyc,,
|
||||
setuptools/__pycache__/compat.cpython-34.pyc,,
|
||||
pkg_resources/__pycache__/__init__.cpython-34.pyc,,
|
||||
setuptools/command/__pycache__/install.cpython-34.pyc,,
|
||||
setuptools/command/__pycache__/egg_info.cpython-34.pyc,,
|
||||
pkg_resources/_vendor/packaging/__pycache__/__about__.cpython-34.pyc,,
|
||||
setuptools/command/__pycache__/test.cpython-34.pyc,,
|
||||
setuptools/command/__pycache__/register.cpython-34.pyc,,
|
||||
setuptools/command/__pycache__/bdist_wininst.cpython-34.pyc,,
|
||||
setuptools/__pycache__/utils.cpython-34.pyc,,
|
||||
setuptools/command/__pycache__/easy_install.cpython-34.pyc,,
|
||||
setuptools/command/__pycache__/bdist_rpm.cpython-34.pyc,,
|
||||
setuptools/__pycache__/py31compat.cpython-34.pyc,,
|
||||
setuptools/__pycache__/depends.cpython-34.pyc,,
|
||||
setuptools/__pycache__/extension.cpython-34.pyc,,
|
||||
setuptools/__pycache__/__init__.cpython-34.pyc,,
|
||||
__pycache__/easy_install.cpython-34.pyc,,
|
||||
setuptools/__pycache__/py27compat.cpython-34.pyc,,
|
||||
setuptools/__pycache__/windows_support.cpython-34.pyc,,
|
||||
setuptools/__pycache__/dist.cpython-34.pyc,,
|
||||
setuptools/command/__pycache__/saveopts.cpython-34.pyc,,
|
||||
pkg_resources/_vendor/packaging/__pycache__/specifiers.cpython-34.pyc,,
|
||||
_markerlib/__pycache__/__init__.cpython-34.pyc,,
|
||||
setuptools/command/__pycache__/install_scripts.cpython-34.pyc,,
|
||||
setuptools/__pycache__/msvc9_support.cpython-34.pyc,,
|
||||
pkg_resources/_vendor/packaging/__pycache__/__init__.cpython-34.pyc,,
|
||||
setuptools/__pycache__/ssl_support.cpython-34.pyc,,
|
||||
setuptools/__pycache__/version.cpython-34.pyc,,
|
||||
setuptools/__pycache__/site-patch.cpython-34.pyc,,
|
||||
setuptools/command/__pycache__/rotate.cpython-34.pyc,,
|
||||
pkg_resources/_vendor/__pycache__/__init__.cpython-34.pyc,,
|
||||
setuptools/command/__pycache__/build_py.cpython-34.pyc,,
|
||||
setuptools/__pycache__/archive_util.cpython-34.pyc,,
|
||||
setuptools/command/__pycache__/install_lib.cpython-34.pyc,,
|
||||
setuptools/command/__pycache__/__init__.cpython-34.pyc,,
|
||||
pkg_resources/_vendor/packaging/__pycache__/_structures.cpython-34.pyc,,
|
||||
setuptools/command/__pycache__/build_ext.cpython-34.pyc,,
|
||||
setuptools/__pycache__/py26compat.cpython-34.pyc,,
|
||||
setuptools/__pycache__/lib2to3_ex.cpython-34.pyc,,
|
||||
setuptools/__pycache__/unicode_utils.cpython-34.pyc,,
|
||||
setuptools/command/__pycache__/bdist_egg.cpython-34.pyc,,
|
||||
setuptools/command/__pycache__/develop.cpython-34.pyc,,
|
||||
setuptools/command/__pycache__/upload_docs.cpython-34.pyc,,
|
||||
setuptools/command/__pycache__/sdist.cpython-34.pyc,,
|
||||
pkg_resources/_vendor/packaging/__pycache__/_compat.cpython-34.pyc,,
|
||||
pkg_resources/_vendor/packaging/__pycache__/version.cpython-34.pyc,,
|
||||
setuptools/__pycache__/py26compat.cpython-34.pyc,,
|
||||
pkg_resources/_vendor/packaging/__pycache__/_compat.cpython-34.pyc,,
|
||||
setuptools/command/__pycache__/build_ext.cpython-34.pyc,,
|
||||
setuptools/command/__pycache__/install_scripts.cpython-34.pyc,,
|
||||
setuptools/__pycache__/ssl_support.cpython-34.pyc,,
|
||||
setuptools/__pycache__/dist.cpython-34.pyc,,
|
||||
setuptools/__pycache__/unicode_utils.cpython-34.pyc,,
|
||||
setuptools/command/__pycache__/install_egg_info.cpython-34.pyc,,
|
||||
pkg_resources/_vendor/packaging/__pycache__/__about__.cpython-34.pyc,,
|
||||
_markerlib/__pycache__/markers.cpython-34.pyc,,
|
||||
setuptools/command/__pycache__/develop.cpython-34.pyc,,
|
||||
pkg_resources/_vendor/packaging/__pycache__/_structures.cpython-34.pyc,,
|
||||
setuptools/__pycache__/utils.cpython-34.pyc,,
|
||||
setuptools/command/__pycache__/upload_docs.cpython-34.pyc,,
|
||||
setuptools/command/__pycache__/easy_install.cpython-34.pyc,,
|
||||
pkg_resources/_vendor/packaging/__pycache__/__init__.cpython-34.pyc,,
|
||||
setuptools/__pycache__/py31compat.cpython-34.pyc,,
|
||||
setuptools/command/__pycache__/egg_info.cpython-34.pyc,,
|
||||
setuptools/__pycache__/site-patch.cpython-34.pyc,,
|
||||
setuptools/__pycache__/__init__.cpython-34.pyc,,
|
||||
setuptools/command/__pycache__/bdist_rpm.cpython-34.pyc,,
|
||||
setuptools/command/__pycache__/build_py.cpython-34.pyc,,
|
||||
setuptools/command/__pycache__/sdist.cpython-34.pyc,,
|
||||
setuptools/__pycache__/package_index.cpython-34.pyc,,
|
||||
pkg_resources/__pycache__/__init__.cpython-34.pyc,,
|
||||
setuptools/command/__pycache__/setopt.cpython-34.pyc,,
|
||||
setuptools/__pycache__/depends.cpython-34.pyc,,
|
||||
setuptools/__pycache__/version.cpython-34.pyc,,
|
||||
setuptools/command/__pycache__/test.cpython-34.pyc,,
|
||||
_markerlib/__pycache__/__init__.cpython-34.pyc,,
|
||||
setuptools/__pycache__/py27compat.cpython-34.pyc,,
|
||||
setuptools/command/__pycache__/saveopts.cpython-34.pyc,,
|
||||
setuptools/command/__pycache__/install.cpython-34.pyc,,
|
||||
setuptools/__pycache__/msvc9_support.cpython-34.pyc,,
|
||||
setuptools/command/__pycache__/register.cpython-34.pyc,,
|
||||
setuptools/__pycache__/compat.cpython-34.pyc,,
|
||||
setuptools/command/__pycache__/rotate.cpython-34.pyc,,
|
||||
__pycache__/easy_install.cpython-34.pyc,,
|
||||
setuptools/command/__pycache__/alias.cpython-34.pyc,,
|
||||
setuptools/command/__pycache__/install_lib.cpython-34.pyc,,
|
||||
pkg_resources/_vendor/__pycache__/__init__.cpython-34.pyc,,
|
||||
setuptools/__pycache__/lib2to3_ex.cpython-34.pyc,,
|
||||
setuptools/command/__pycache__/__init__.cpython-34.pyc,,
|
||||
setuptools/__pycache__/sandbox.cpython-34.pyc,,
|
||||
setuptools/command/__pycache__/bdist_egg.cpython-34.pyc,,
|
||||
pkg_resources/_vendor/packaging/__pycache__/specifiers.cpython-34.pyc,,
|
||||
setuptools/command/__pycache__/bdist_wininst.cpython-34.pyc,,
|
||||
setuptools/__pycache__/windows_support.cpython-34.pyc,,
|
||||
setuptools/__pycache__/archive_util.cpython-34.pyc,,
|
||||
setuptools/__pycache__/extension.cpython-34.pyc,,
|
|
@ -1,2 +1,2 @@
|
|||
https://pypi.python.org/packages/source/c/certifi/certifi-2015.04.28.tar.gz#md5=12c7c3a063b2ff97a0f8291d8de41e8c
|
||||
https://pypi.python.org/packages/source/c/certifi/certifi-2015.11.20.tar.gz#md5=25134646672c695c1ff1593c2dd75d08
|
||||
https://pypi.python.org/packages/source/w/wincertstore/wincertstore-0.2.zip#md5=ae728f2f007185648d0c7a8679b361e2
|
|
@ -1 +1 @@
|
|||
{"generator": "bdist_wheel (0.26.0)", "summary": "Easily download, build, install, upgrade, and uninstall Python packages", "classifiers": ["Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", "License :: OSI Approved :: Python Software Foundation License", "License :: OSI Approved :: Zope Public License", "Operating System :: OS Independent", "Programming Language :: Python :: 2.6", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Topic :: Software Development :: Libraries :: Python Modules", "Topic :: System :: Archiving :: Packaging", "Topic :: System :: Systems Administration", "Topic :: Utilities"], "extensions": {"python.details": {"project_urls": {"Home": "https://bitbucket.org/pypa/setuptools"}, "contacts": [{"email": "distutils-sig@python.org", "name": "Python Packaging Authority", "role": "author"}], "document_names": {"description": "DESCRIPTION.rst"}}, "python.exports": {"console_scripts": {"easy_install": "setuptools.command.easy_install:main", "easy_install-3.5": "setuptools.command.easy_install:main"}, "distutils.commands": {"alias": "setuptools.command.alias:alias", "bdist_egg": "setuptools.command.bdist_egg:bdist_egg", "bdist_rpm": "setuptools.command.bdist_rpm:bdist_rpm", "bdist_wininst": "setuptools.command.bdist_wininst:bdist_wininst", "build_ext": "setuptools.command.build_ext:build_ext", "build_py": "setuptools.command.build_py:build_py", "develop": "setuptools.command.develop:develop", "easy_install": "setuptools.command.easy_install:easy_install", "egg_info": "setuptools.command.egg_info:egg_info", "install": "setuptools.command.install:install", "install_egg_info": "setuptools.command.install_egg_info:install_egg_info", "install_lib": "setuptools.command.install_lib:install_lib", "install_scripts": "setuptools.command.install_scripts:install_scripts", "register": "setuptools.command.register:register", "rotate": "setuptools.command.rotate:rotate", "saveopts": "setuptools.command.saveopts:saveopts", "sdist": "setuptools.command.sdist:sdist", "setopt": "setuptools.command.setopt:setopt", "test": "setuptools.command.test:test", "upload_docs": "setuptools.command.upload_docs:upload_docs"}, "distutils.setup_keywords": {"convert_2to3_doctests": "setuptools.dist:assert_string_list", "dependency_links": "setuptools.dist:assert_string_list", "eager_resources": "setuptools.dist:assert_string_list", "entry_points": "setuptools.dist:check_entry_points", "exclude_package_data": "setuptools.dist:check_package_data", "extras_require": "setuptools.dist:check_extras", "include_package_data": "setuptools.dist:assert_bool", "install_requires": "setuptools.dist:check_requirements", "namespace_packages": "setuptools.dist:check_nsp", "package_data": "setuptools.dist:check_package_data", "packages": "setuptools.dist:check_packages", "setup_requires": "setuptools.dist:check_requirements", "test_loader": "setuptools.dist:check_importable", "test_runner": "setuptools.dist:check_importable", "test_suite": "setuptools.dist:check_test_suite", "tests_require": "setuptools.dist:check_requirements", "use_2to3": "setuptools.dist:assert_bool", "use_2to3_exclude_fixers": "setuptools.dist:assert_string_list", "use_2to3_fixers": "setuptools.dist:assert_string_list", "zip_safe": "setuptools.dist:assert_bool"}, "egg_info.writers": {"PKG-INFO": "setuptools.command.egg_info:write_pkg_info", "dependency_links.txt": "setuptools.command.egg_info:overwrite_arg", "depends.txt": "setuptools.command.egg_info:warn_depends_obsolete", "eager_resources.txt": "setuptools.command.egg_info:overwrite_arg", "entry_points.txt": "setuptools.command.egg_info:write_entries", "namespace_packages.txt": "setuptools.command.egg_info:overwrite_arg", "requires.txt": "setuptools.command.egg_info:write_requirements", "top_level.txt": "setuptools.command.egg_info:write_toplevel_names"}, "setuptools.installation": {"eggsecutable": "setuptools.command.easy_install:bootstrap"}}, "python.commands": {"wrap_console": {"easy_install": "setuptools.command.easy_install:main", "easy_install-3.5": "setuptools.command.easy_install:main"}}}, "keywords": ["CPAN", "PyPI", "distutils", "eggs", "package", "management"], "license": "PSF or ZPL", "metadata_version": "2.0", "name": "setuptools", "extras": ["certs", "ssl"], "run_requires": [{"requires": ["certifi (==2015.04.28)"], "extra": "certs"}, {"requires": ["wincertstore (==0.2)"], "extra": "ssl", "environment": "sys_platform=='win32'"}], "version": "18.5", "test_requires": [{"requires": ["pytest", "setuptools[ssl]"]}]}
|
||||
{"generator": "bdist_wheel (0.26.0)", "summary": "Easily download, build, install, upgrade, and uninstall Python packages", "classifiers": ["Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", "License :: OSI Approved :: Python Software Foundation License", "License :: OSI Approved :: Zope Public License", "Operating System :: OS Independent", "Programming Language :: Python :: 2.6", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Topic :: Software Development :: Libraries :: Python Modules", "Topic :: System :: Archiving :: Packaging", "Topic :: System :: Systems Administration", "Topic :: Utilities"], "extensions": {"python.details": {"project_urls": {"Home": "https://bitbucket.org/pypa/setuptools"}, "contacts": [{"email": "distutils-sig@python.org", "name": "Python Packaging Authority", "role": "author"}], "document_names": {"description": "DESCRIPTION.rst"}}, "python.exports": {"console_scripts": {"easy_install": "setuptools.command.easy_install:main", "easy_install-3.5": "setuptools.command.easy_install:main"}, "distutils.commands": {"alias": "setuptools.command.alias:alias", "bdist_egg": "setuptools.command.bdist_egg:bdist_egg", "bdist_rpm": "setuptools.command.bdist_rpm:bdist_rpm", "bdist_wininst": "setuptools.command.bdist_wininst:bdist_wininst", "build_ext": "setuptools.command.build_ext:build_ext", "build_py": "setuptools.command.build_py:build_py", "develop": "setuptools.command.develop:develop", "easy_install": "setuptools.command.easy_install:easy_install", "egg_info": "setuptools.command.egg_info:egg_info", "install": "setuptools.command.install:install", "install_egg_info": "setuptools.command.install_egg_info:install_egg_info", "install_lib": "setuptools.command.install_lib:install_lib", "install_scripts": "setuptools.command.install_scripts:install_scripts", "register": "setuptools.command.register:register", "rotate": "setuptools.command.rotate:rotate", "saveopts": "setuptools.command.saveopts:saveopts", "sdist": "setuptools.command.sdist:sdist", "setopt": "setuptools.command.setopt:setopt", "test": "setuptools.command.test:test", "upload_docs": "setuptools.command.upload_docs:upload_docs"}, "distutils.setup_keywords": {"convert_2to3_doctests": "setuptools.dist:assert_string_list", "dependency_links": "setuptools.dist:assert_string_list", "eager_resources": "setuptools.dist:assert_string_list", "entry_points": "setuptools.dist:check_entry_points", "exclude_package_data": "setuptools.dist:check_package_data", "extras_require": "setuptools.dist:check_extras", "include_package_data": "setuptools.dist:assert_bool", "install_requires": "setuptools.dist:check_requirements", "namespace_packages": "setuptools.dist:check_nsp", "package_data": "setuptools.dist:check_package_data", "packages": "setuptools.dist:check_packages", "setup_requires": "setuptools.dist:check_requirements", "test_loader": "setuptools.dist:check_importable", "test_runner": "setuptools.dist:check_importable", "test_suite": "setuptools.dist:check_test_suite", "tests_require": "setuptools.dist:check_requirements", "use_2to3": "setuptools.dist:assert_bool", "use_2to3_exclude_fixers": "setuptools.dist:assert_string_list", "use_2to3_fixers": "setuptools.dist:assert_string_list", "zip_safe": "setuptools.dist:assert_bool"}, "egg_info.writers": {"PKG-INFO": "setuptools.command.egg_info:write_pkg_info", "dependency_links.txt": "setuptools.command.egg_info:overwrite_arg", "depends.txt": "setuptools.command.egg_info:warn_depends_obsolete", "eager_resources.txt": "setuptools.command.egg_info:overwrite_arg", "entry_points.txt": "setuptools.command.egg_info:write_entries", "namespace_packages.txt": "setuptools.command.egg_info:overwrite_arg", "requires.txt": "setuptools.command.egg_info:write_requirements", "top_level.txt": "setuptools.command.egg_info:write_toplevel_names"}, "setuptools.installation": {"eggsecutable": "setuptools.command.easy_install:bootstrap"}}, "python.commands": {"wrap_console": {"easy_install": "setuptools.command.easy_install:main", "easy_install-3.5": "setuptools.command.easy_install:main"}}}, "keywords": ["CPAN", "PyPI", "distutils", "eggs", "package", "management"], "license": "PSF or ZPL", "metadata_version": "2.0", "name": "setuptools", "extras": ["certs", "ssl"], "run_requires": [{"requires": ["certifi (==2015.11.20)"], "extra": "certs"}, {"requires": ["wincertstore (==0.2)"], "extra": "ssl", "environment": "sys_platform=='win32'"}], "version": "19.1.1", "test_requires": [{"requires": ["pytest (>=2.8)", "setuptools[ssl]"]}]}
|
|
@ -2,9 +2,13 @@ from glob import glob
|
|||
from distutils.util import convert_path
|
||||
import distutils.command.build_py as orig
|
||||
import os
|
||||
import sys
|
||||
import fnmatch
|
||||
import textwrap
|
||||
import io
|
||||
import distutils.errors
|
||||
import collections
|
||||
import itertools
|
||||
|
||||
|
||||
try:
|
||||
from setuptools.lib2to3_ex import Mixin2to3
|
||||
|
@ -157,17 +161,15 @@ class build_py(orig.build_py, Mixin2to3):
|
|||
else:
|
||||
return init_py
|
||||
|
||||
f = open(init_py, 'rbU')
|
||||
if 'declare_namespace'.encode() not in f.read():
|
||||
from distutils.errors import DistutilsError
|
||||
|
||||
raise DistutilsError(
|
||||
with io.open(init_py, 'rb') as f:
|
||||
contents = f.read()
|
||||
if b'declare_namespace' not in contents:
|
||||
raise distutils.errors.DistutilsError(
|
||||
"Namespace package problem: %s is a namespace package, but "
|
||||
"its\n__init__.py does not call declare_namespace()! Please "
|
||||
'fix it.\n(See the setuptools manual under '
|
||||
'"Namespace Packages" for details.)\n"' % (package,)
|
||||
)
|
||||
f.close()
|
||||
return init_py
|
||||
|
||||
def initialize_options(self):
|
||||
|
@ -182,20 +184,25 @@ class build_py(orig.build_py, Mixin2to3):
|
|||
|
||||
def exclude_data_files(self, package, src_dir, files):
|
||||
"""Filter filenames for package's data files in 'src_dir'"""
|
||||
globs = (self.exclude_package_data.get('', [])
|
||||
+ self.exclude_package_data.get(package, []))
|
||||
bad = []
|
||||
for pattern in globs:
|
||||
bad.extend(
|
||||
fnmatch.filter(
|
||||
files, os.path.join(src_dir, convert_path(pattern))
|
||||
)
|
||||
globs = (
|
||||
self.exclude_package_data.get('', [])
|
||||
+ self.exclude_package_data.get(package, [])
|
||||
)
|
||||
bad = set(
|
||||
item
|
||||
for pattern in globs
|
||||
for item in fnmatch.filter(
|
||||
files,
|
||||
os.path.join(src_dir, convert_path(pattern)),
|
||||
)
|
||||
bad = dict.fromkeys(bad)
|
||||
seen = {}
|
||||
)
|
||||
seen = collections.defaultdict(itertools.count)
|
||||
return [
|
||||
f for f in files if f not in bad
|
||||
and f not in seen and seen.setdefault(f, 1) # ditch dupes
|
||||
fn
|
||||
for fn in files
|
||||
if fn not in bad
|
||||
# ditch dupes
|
||||
and not next(seen[fn])
|
||||
]
|
||||
|
||||
|
||||
|
|
|
@ -3,6 +3,7 @@ from distutils import log
|
|||
from distutils.errors import DistutilsError, DistutilsOptionError
|
||||
import os
|
||||
import glob
|
||||
import io
|
||||
|
||||
from pkg_resources import Distribution, PathMetadata, normalize_path
|
||||
from setuptools.command.easy_install import easy_install
|
||||
|
@ -53,8 +54,8 @@ class develop(easy_install):
|
|||
# pick up setup-dir .egg files only: no .egg-info
|
||||
self.package_index.scan(glob.glob('*.egg'))
|
||||
|
||||
self.egg_link = os.path.join(self.install_dir, ei.egg_name +
|
||||
'.egg-link')
|
||||
egg_link_fn = ei.egg_name + '.egg-link'
|
||||
self.egg_link = os.path.join(self.install_dir, egg_link_fn)
|
||||
self.egg_base = ei.egg_base
|
||||
if self.egg_path is None:
|
||||
self.egg_path = os.path.abspath(ei.egg_base)
|
||||
|
@ -124,9 +125,8 @@ class develop(easy_install):
|
|||
# create an .egg-link in the installation dir, pointing to our egg
|
||||
log.info("Creating %s (link to %s)", self.egg_link, self.egg_base)
|
||||
if not self.dry_run:
|
||||
f = open(self.egg_link, "w")
|
||||
f.write(self.egg_path + "\n" + self.setup_path)
|
||||
f.close()
|
||||
with open(self.egg_link, "w") as f:
|
||||
f.write(self.egg_path + "\n" + self.setup_path)
|
||||
# postprocess the installed distro, fixing up .pth, installing scripts,
|
||||
# and handling requirements
|
||||
self.process_distribution(None, self.dist, not self.no_deps)
|
||||
|
@ -163,7 +163,33 @@ class develop(easy_install):
|
|||
for script_name in self.distribution.scripts or []:
|
||||
script_path = os.path.abspath(convert_path(script_name))
|
||||
script_name = os.path.basename(script_path)
|
||||
f = open(script_path, 'rU')
|
||||
script_text = f.read()
|
||||
f.close()
|
||||
with io.open(script_path) as strm:
|
||||
script_text = strm.read()
|
||||
self.install_script(dist, script_name, script_text, script_path)
|
||||
|
||||
def install_wrapper_scripts(self, dist):
|
||||
dist = VersionlessRequirement(dist)
|
||||
return easy_install.install_wrapper_scripts(self, dist)
|
||||
|
||||
|
||||
class VersionlessRequirement(object):
|
||||
"""
|
||||
Adapt a pkg_resources.Distribution to simply return the project
|
||||
name as the 'requirement' so that scripts will work across
|
||||
multiple versions.
|
||||
|
||||
>>> dist = Distribution(project_name='foo', version='1.0')
|
||||
>>> str(dist.as_requirement())
|
||||
'foo==1.0'
|
||||
>>> adapted_dist = VersionlessRequirement(dist)
|
||||
>>> str(adapted_dist.as_requirement())
|
||||
'foo'
|
||||
"""
|
||||
def __init__(self, dist):
|
||||
self.__dist = dist
|
||||
|
||||
def __getattr__(self, name):
|
||||
return getattr(self.__dist, name)
|
||||
|
||||
def as_requirement(self):
|
||||
return self.project_name
|
||||
|
|
|
@ -20,6 +20,7 @@ from distutils.errors import DistutilsArgError, DistutilsOptionError, \
|
|||
from distutils.command.install import INSTALL_SCHEMES, SCHEME_KEYS
|
||||
from distutils import log, dir_util
|
||||
from distutils.command.build_scripts import first_line_re
|
||||
from distutils.spawn import find_executable
|
||||
import sys
|
||||
import os
|
||||
import zipimport
|
||||
|
@ -760,9 +761,10 @@ class easy_install(Command):
|
|||
return dst
|
||||
|
||||
def install_wrapper_scripts(self, dist):
|
||||
if not self.exclude_scripts:
|
||||
for args in ScriptWriter.best().get_args(dist):
|
||||
self.write_script(*args)
|
||||
if self.exclude_scripts:
|
||||
return
|
||||
for args in ScriptWriter.best().get_args(dist):
|
||||
self.write_script(*args)
|
||||
|
||||
def install_script(self, dist, script_name, script_text, dev_path=None):
|
||||
"""Generate a legacy script wrapper and install it"""
|
||||
|
@ -770,8 +772,8 @@ class easy_install(Command):
|
|||
is_script = is_python_script(script_text, script_name)
|
||||
|
||||
if is_script:
|
||||
script_text = (ScriptWriter.get_header(script_text) +
|
||||
self._load_template(dev_path) % locals())
|
||||
body = self._load_template(dev_path) % locals()
|
||||
script_text = ScriptWriter.get_header(script_text) + body
|
||||
self.write_script(script_name, _to_ascii(script_text), 'b')
|
||||
|
||||
@staticmethod
|
||||
|
@ -803,9 +805,8 @@ class easy_install(Command):
|
|||
ensure_directory(target)
|
||||
if os.path.exists(target):
|
||||
os.unlink(target)
|
||||
f = open(target, "w" + mode)
|
||||
f.write(contents)
|
||||
f.close()
|
||||
with open(target, "w" + mode) as f:
|
||||
f.write(contents)
|
||||
chmod(target, 0o777 - mask)
|
||||
|
||||
def install_eggs(self, spec, dist_filename, tmpdir):
|
||||
|
@ -1401,7 +1402,7 @@ def expand_paths(inputs):
|
|||
def extract_wininst_cfg(dist_filename):
|
||||
"""Extract configuration data from a bdist_wininst .exe
|
||||
|
||||
Returns a ConfigParser.RawConfigParser, or None
|
||||
Returns a configparser.RawConfigParser, or None
|
||||
"""
|
||||
f = open(dist_filename, 'rb')
|
||||
try:
|
||||
|
@ -1414,7 +1415,7 @@ def extract_wininst_cfg(dist_filename):
|
|||
return None
|
||||
f.seek(prepended - 12)
|
||||
|
||||
from setuptools.compat import StringIO, ConfigParser
|
||||
from setuptools.compat import StringIO, configparser
|
||||
import struct
|
||||
|
||||
tag, cfglen, bmlen = struct.unpack("<iii", f.read(12))
|
||||
|
@ -1422,7 +1423,7 @@ def extract_wininst_cfg(dist_filename):
|
|||
return None # not a valid tag
|
||||
|
||||
f.seek(prepended - (12 + cfglen))
|
||||
cfg = ConfigParser.RawConfigParser(
|
||||
cfg = configparser.RawConfigParser(
|
||||
{'version': '', 'target_version': ''})
|
||||
try:
|
||||
part = f.read(cfglen)
|
||||
|
@ -1432,7 +1433,7 @@ def extract_wininst_cfg(dist_filename):
|
|||
# be text, so decode it.
|
||||
config = config.decode(sys.getfilesystemencoding())
|
||||
cfg.readfp(StringIO(config))
|
||||
except ConfigParser.Error:
|
||||
except configparser.Error:
|
||||
return None
|
||||
if not cfg.has_section('metadata') or not cfg.has_section('Setup'):
|
||||
return None
|
||||
|
@ -2125,8 +2126,8 @@ class WindowsScriptWriter(ScriptWriter):
|
|||
blockers = [name + x for x in old]
|
||||
yield name + ext, header + script_text, 't', blockers
|
||||
|
||||
@staticmethod
|
||||
def _adjust_header(type_, orig_header):
|
||||
@classmethod
|
||||
def _adjust_header(cls, type_, orig_header):
|
||||
"""
|
||||
Make sure 'pythonw' is used for gui and and 'python' is used for
|
||||
console (regardless of what sys.executable is).
|
||||
|
@ -2137,11 +2138,19 @@ class WindowsScriptWriter(ScriptWriter):
|
|||
pattern, repl = repl, pattern
|
||||
pattern_ob = re.compile(re.escape(pattern), re.IGNORECASE)
|
||||
new_header = pattern_ob.sub(string=orig_header, repl=repl)
|
||||
return new_header if cls._use_header(new_header) else orig_header
|
||||
|
||||
@staticmethod
|
||||
def _use_header(new_header):
|
||||
"""
|
||||
Should _adjust_header use the replaced header?
|
||||
|
||||
On non-windows systems, always use. On
|
||||
Windows systems, only use the replaced header if it resolves
|
||||
to an executable on the system.
|
||||
"""
|
||||
clean_header = new_header[2:-1].strip('"')
|
||||
if sys.platform == 'win32' and not os.path.exists(clean_header):
|
||||
# the adjusted version doesn't exist, so return the original
|
||||
return orig_header
|
||||
return new_header
|
||||
return sys.platform != 'win32' or find_executable(clean_header)
|
||||
|
||||
|
||||
class WindowsExecutableLauncherWriter(WindowsScriptWriter):
|
||||
|
|
|
@ -10,16 +10,17 @@ import distutils.filelist
|
|||
import os
|
||||
import re
|
||||
import sys
|
||||
import io
|
||||
import warnings
|
||||
import time
|
||||
|
||||
try:
|
||||
from setuptools_svn import svn_utils
|
||||
except ImportError:
|
||||
pass
|
||||
from setuptools.compat import basestring, PY3, StringIO
|
||||
|
||||
from setuptools import Command
|
||||
from setuptools.command.sdist import sdist
|
||||
from setuptools.compat import basestring, PY3, StringIO
|
||||
from setuptools.command.sdist import walk_revctrl
|
||||
from setuptools.command.setopt import edit_config
|
||||
from setuptools.command import bdist_egg
|
||||
from pkg_resources import (
|
||||
parse_requirements, safe_name, parse_version,
|
||||
safe_version, yield_lines, EntryPoint, iter_entry_points, to_filename)
|
||||
|
@ -27,6 +28,12 @@ import setuptools.unicode_utils as unicode_utils
|
|||
|
||||
from pkg_resources import packaging
|
||||
|
||||
try:
|
||||
from setuptools_svn import svn_utils
|
||||
except ImportError:
|
||||
pass
|
||||
|
||||
|
||||
class egg_info(Command):
|
||||
description = "create a distribution's .egg-info directory"
|
||||
|
||||
|
@ -58,8 +65,6 @@ class egg_info(Command):
|
|||
self.vtags = None
|
||||
|
||||
def save_version_info(self, filename):
|
||||
from setuptools.command.setopt import edit_config
|
||||
|
||||
values = dict(
|
||||
egg_info=dict(
|
||||
tag_svn_revision=0,
|
||||
|
@ -184,12 +189,8 @@ class egg_info(Command):
|
|||
if self.tag_build:
|
||||
version += self.tag_build
|
||||
if self.tag_svn_revision:
|
||||
rev = self.get_svn_revision()
|
||||
if rev: # is 0 if it's not an svn working copy
|
||||
version += '-r%s' % rev
|
||||
version += '-r%s' % self.get_svn_revision()
|
||||
if self.tag_date:
|
||||
import time
|
||||
|
||||
version += time.strftime("-%Y%m%d")
|
||||
return version
|
||||
|
||||
|
@ -390,7 +391,6 @@ def write_pkg_info(cmd, basename, filename):
|
|||
metadata.name, metadata.version = oldname, oldver
|
||||
|
||||
safe = getattr(cmd.distribution, 'zip_safe', None)
|
||||
from setuptools.command import bdist_egg
|
||||
|
||||
bdist_egg.write_safety_flag(cmd.egg_info, safe)
|
||||
|
||||
|
@ -467,14 +467,15 @@ def write_entries(cmd, basename, filename):
|
|||
|
||||
|
||||
def get_pkg_info_revision():
|
||||
# See if we can get a -r### off of PKG-INFO, in case this is an sdist of
|
||||
# a subversion revision
|
||||
#
|
||||
"""
|
||||
Get a -r### off of PKG-INFO Version in case this is an sdist of
|
||||
a subversion revision.
|
||||
"""
|
||||
warnings.warn("get_pkg_info_revision is deprecated.", DeprecationWarning)
|
||||
if os.path.exists('PKG-INFO'):
|
||||
f = open('PKG-INFO', 'rU')
|
||||
for line in f:
|
||||
match = re.match(r"Version:.*-r(\d+)\s*$", line)
|
||||
if match:
|
||||
return int(match.group(1))
|
||||
f.close()
|
||||
with io.open('PKG-INFO') as f:
|
||||
for line in f:
|
||||
match = re.match(r"Version:.*-r(\d+)\s*$", line)
|
||||
if match:
|
||||
return int(match.group(1))
|
||||
return 0
|
||||
|
|
|
@ -79,6 +79,8 @@ class install_lib(orig.install_lib):
|
|||
base = os.path.join('__pycache__', '__init__.' + imp.get_tag())
|
||||
yield base + '.pyc'
|
||||
yield base + '.pyo'
|
||||
yield base + '.opt-1.pyc'
|
||||
yield base + '.opt-2.pyc'
|
||||
|
||||
def copy_tree(
|
||||
self, infile, outfile,
|
||||
|
|
|
@ -3,6 +3,7 @@ from distutils import log
|
|||
import distutils.command.sdist as orig
|
||||
import os
|
||||
import sys
|
||||
import io
|
||||
|
||||
from setuptools.compat import PY3
|
||||
from setuptools.utils import cs_path_exists
|
||||
|
@ -166,11 +167,8 @@ class sdist(orig.sdist):
|
|||
if not os.path.isfile(self.manifest):
|
||||
return False
|
||||
|
||||
fp = open(self.manifest, 'rbU')
|
||||
try:
|
||||
with io.open(self.manifest, 'rb') as fp:
|
||||
first_line = fp.readline()
|
||||
finally:
|
||||
fp.close()
|
||||
return (first_line !=
|
||||
'# file GENERATED by distutils, do NOT edit\n'.encode())
|
||||
|
||||
|
|
|
@ -37,10 +37,10 @@ def edit_config(filename, settings, dry_run=False):
|
|||
while a dictionary lists settings to be changed or deleted in that section.
|
||||
A setting of ``None`` means to delete that setting.
|
||||
"""
|
||||
from setuptools.compat import ConfigParser
|
||||
from setuptools.compat import configparser
|
||||
|
||||
log.debug("Reading configuration from %s", filename)
|
||||
opts = ConfigParser.RawConfigParser()
|
||||
opts = configparser.RawConfigParser()
|
||||
opts.read([filename])
|
||||
for section, options in settings.items():
|
||||
if options is None:
|
||||
|
|
|
@ -41,6 +41,17 @@ class ScanningLoader(TestLoader):
|
|||
return tests[0] # don't create a nested suite for only one return
|
||||
|
||||
|
||||
# adapted from jaraco.classes.properties:NonDataProperty
|
||||
class NonDataProperty(object):
|
||||
def __init__(self, fget):
|
||||
self.fget = fget
|
||||
|
||||
def __get__(self, obj, objtype=None):
|
||||
if obj is None:
|
||||
return self
|
||||
return self.fget(obj)
|
||||
|
||||
|
||||
class test(Command):
|
||||
"""Command to run unit tests after in-place build"""
|
||||
|
||||
|
@ -78,7 +89,7 @@ class test(Command):
|
|||
if self.test_runner is None:
|
||||
self.test_runner = getattr(self.distribution, 'test_runner', None)
|
||||
|
||||
@property
|
||||
@NonDataProperty
|
||||
def test_args(self):
|
||||
return list(self._test_args())
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@ PY2 = not PY3
|
|||
if PY2:
|
||||
basestring = basestring
|
||||
import __builtin__ as builtins
|
||||
import ConfigParser
|
||||
import ConfigParser as configparser
|
||||
from StringIO import StringIO
|
||||
BytesIO = StringIO
|
||||
func_code = lambda o: o.func_code
|
||||
|
@ -29,6 +29,8 @@ if PY2:
|
|||
from urllib2 import urlopen, HTTPError, URLError, unquote, splituser
|
||||
from urlparse import urlparse, urlunparse, urljoin, urlsplit, urlunsplit
|
||||
filterfalse = itertools.ifilterfalse
|
||||
filter = itertools.ifilter
|
||||
map = itertools.imap
|
||||
|
||||
exec("""def reraise(tp, value, tb=None):
|
||||
raise tp, value, tb""")
|
||||
|
@ -36,7 +38,7 @@ if PY2:
|
|||
if PY3:
|
||||
basestring = str
|
||||
import builtins
|
||||
import configparser as ConfigParser
|
||||
import configparser
|
||||
from io import StringIO, BytesIO
|
||||
func_code = lambda o: o.__code__
|
||||
func_globals = lambda o: o.__globals__
|
||||
|
@ -59,6 +61,8 @@ if PY3:
|
|||
urlunsplit, splittag,
|
||||
)
|
||||
filterfalse = itertools.filterfalse
|
||||
filter = filter
|
||||
map = map
|
||||
|
||||
def reraise(tp, value, tb=None):
|
||||
if value.__traceback__ is not tb:
|
||||
|
|
|
@ -267,8 +267,7 @@ class Distribution(_Distribution):
|
|||
if attrs and 'setup_requires' in attrs:
|
||||
self.fetch_build_eggs(attrs['setup_requires'])
|
||||
for ep in pkg_resources.iter_entry_points('distutils.setup_keywords'):
|
||||
if not hasattr(self,ep.name):
|
||||
setattr(self,ep.name,None)
|
||||
vars(self).setdefault(ep.name, None)
|
||||
_Distribution.__init__(self,attrs)
|
||||
if isinstance(self.metadata.version, numbers.Number):
|
||||
# Some people apparently take "version number" too literally :)
|
||||
|
|
|
@ -6,6 +6,7 @@ import shutil
|
|||
import socket
|
||||
import base64
|
||||
import hashlib
|
||||
import itertools
|
||||
from functools import wraps
|
||||
|
||||
from pkg_resources import (
|
||||
|
@ -16,11 +17,11 @@ from pkg_resources import (
|
|||
from setuptools import ssl_support
|
||||
from distutils import log
|
||||
from distutils.errors import DistutilsError
|
||||
from setuptools.compat import (urllib2, httplib, StringIO, HTTPError,
|
||||
urlparse, urlunparse, unquote, splituser,
|
||||
url2pathname, name2codepoint,
|
||||
unichr, urljoin, urlsplit, urlunsplit,
|
||||
ConfigParser)
|
||||
from setuptools.compat import (
|
||||
urllib2, httplib, StringIO, HTTPError, urlparse, urlunparse, unquote,
|
||||
splituser, url2pathname, name2codepoint, unichr, urljoin, urlsplit,
|
||||
urlunsplit, configparser, filter, map,
|
||||
)
|
||||
from setuptools.compat import filterfalse
|
||||
from fnmatch import translate
|
||||
from setuptools.py26compat import strip_fragment
|
||||
|
@ -352,20 +353,30 @@ class PackageIndex(Environment):
|
|||
self.warn(msg, url)
|
||||
|
||||
def scan_egg_links(self, search_path):
|
||||
for item in search_path:
|
||||
if os.path.isdir(item):
|
||||
for entry in os.listdir(item):
|
||||
if entry.endswith('.egg-link'):
|
||||
self.scan_egg_link(item, entry)
|
||||
dirs = filter(os.path.isdir, search_path)
|
||||
egg_links = (
|
||||
(path, entry)
|
||||
for path in dirs
|
||||
for entry in os.listdir(path)
|
||||
if entry.endswith('.egg-link')
|
||||
)
|
||||
list(itertools.starmap(self.scan_egg_link, egg_links))
|
||||
|
||||
def scan_egg_link(self, path, entry):
|
||||
lines = [_f for _f in map(str.strip,
|
||||
open(os.path.join(path, entry))) if _f]
|
||||
if len(lines)==2:
|
||||
for dist in find_distributions(os.path.join(path, lines[0])):
|
||||
dist.location = os.path.join(path, *lines)
|
||||
dist.precedence = SOURCE_DIST
|
||||
self.add(dist)
|
||||
with open(os.path.join(path, entry)) as raw_lines:
|
||||
# filter non-empty lines
|
||||
lines = list(filter(None, map(str.strip, raw_lines)))
|
||||
|
||||
if len(lines) != 2:
|
||||
# format is not recognized; punt
|
||||
return
|
||||
|
||||
egg_path, setup_path = lines
|
||||
|
||||
for dist in find_distributions(os.path.join(path, egg_path)):
|
||||
dist.location = os.path.join(path, *lines)
|
||||
dist.precedence = SOURCE_DIST
|
||||
self.add(dist)
|
||||
|
||||
def process_index(self,url,page):
|
||||
"""Process the contents of a PyPI page"""
|
||||
|
@ -934,14 +945,14 @@ class Credential(object):
|
|||
def __str__(self):
|
||||
return '%(username)s:%(password)s' % vars(self)
|
||||
|
||||
class PyPIConfig(ConfigParser.ConfigParser):
|
||||
class PyPIConfig(configparser.RawConfigParser):
|
||||
|
||||
def __init__(self):
|
||||
"""
|
||||
Load from ~/.pypirc
|
||||
"""
|
||||
defaults = dict.fromkeys(['username', 'password', 'repository'], '')
|
||||
ConfigParser.ConfigParser.__init__(self, defaults)
|
||||
configparser.RawConfigParser.__init__(self, defaults)
|
||||
|
||||
rc = os.path.join(os.path.expanduser('~'), '.pypirc')
|
||||
if os.path.exists(rc):
|
||||
|
@ -1031,16 +1042,18 @@ def local_open(url):
|
|||
elif path.endswith('/') and os.path.isdir(filename):
|
||||
files = []
|
||||
for f in os.listdir(filename):
|
||||
if f=='index.html':
|
||||
with open(os.path.join(filename,f),'r') as fp:
|
||||
filepath = os.path.join(filename, f)
|
||||
if f == 'index.html':
|
||||
with open(filepath, 'r') as fp:
|
||||
body = fp.read()
|
||||
break
|
||||
elif os.path.isdir(os.path.join(filename,f)):
|
||||
f+='/'
|
||||
files.append("<a href=%r>%s</a>" % (f,f))
|
||||
elif os.path.isdir(filepath):
|
||||
f += '/'
|
||||
files.append('<a href="{name}">{name}</a>'.format(name=f))
|
||||
else:
|
||||
body = ("<html><head><title>%s</title>" % url) + \
|
||||
"</head><body>%s</body></html>" % '\n'.join(files)
|
||||
tmpl = ("<html><head><title>{url}</title>"
|
||||
"</head><body>{files}</body></html>")
|
||||
body = tmpl.format(url=url, files='\n'.join(files))
|
||||
status, message = 200, "OK"
|
||||
else:
|
||||
status, message, body = 404, "Path not found", "Not found"
|
||||
|
|
|
@ -20,7 +20,7 @@ except ImportError:
|
|||
import shutil
|
||||
import tempfile
|
||||
class TemporaryDirectory(object):
|
||||
""""
|
||||
"""
|
||||
Very simple temporary directory context manager.
|
||||
Will try to delete afterward, but will also ignore OS and similar
|
||||
errors on deletion.
|
||||
|
|
|
@ -98,8 +98,8 @@ class UnpickleableException(Exception):
|
|||
"""
|
||||
An exception representing another Exception that could not be pickled.
|
||||
"""
|
||||
@classmethod
|
||||
def dump(cls, type, exc):
|
||||
@staticmethod
|
||||
def dump(type, exc):
|
||||
"""
|
||||
Always return a dumped (pickled) type and exc. If exc can't be pickled,
|
||||
wrap it in UnpickleableException first.
|
||||
|
@ -107,6 +107,8 @@ class UnpickleableException(Exception):
|
|||
try:
|
||||
return pickle.dumps(type), pickle.dumps(exc)
|
||||
except Exception:
|
||||
# get UnpickleableException inside the sandbox
|
||||
from setuptools.sandbox import UnpickleableException as cls
|
||||
return cls.dump(cls, cls(repr(exc)))
|
||||
|
||||
|
||||
|
@ -382,6 +384,7 @@ class DirectorySandbox(AbstractSandbox):
|
|||
AbstractSandbox.__init__(self)
|
||||
|
||||
def _violation(self, operation, *args, **kw):
|
||||
from setuptools.sandbox import SandboxViolation
|
||||
raise SandboxViolation(operation, args, kw)
|
||||
|
||||
if _file:
|
||||
|
|
|
@ -1 +1 @@
|
|||
__version__ = '18.5'
|
||||
__version__ = '19.1.1'
|
||||
|
|
|
@ -91,8 +91,8 @@
|
|||
../stem/util/__pycache__/test_tools.cpython-34.pyc
|
||||
../stem/util/__pycache__/tor_tools.cpython-34.pyc
|
||||
./
|
||||
dependency_links.txt
|
||||
top_level.txt
|
||||
PKG-INFO
|
||||
dependency_links.txt
|
||||
SOURCES.txt
|
||||
../../../../bin/tor-prompt
|
||||
|
|
Loading…
Reference in a new issue