Browse Source

added setuptools and new url taggit-template2

newsletter
Esther Kleinhenz 6 years ago
parent
commit
8da96e27a5
44 changed files with 566 additions and 699 deletions
  1. 4
    0
      application/templates/blog_search_list_view.html
  2. 3
    0
      application/urls.py
  3. 4
    1
      application/views.py
  4. 7
    6
      thesisenv/bin/easy_install
  5. 7
    6
      thesisenv/bin/easy_install-3.6
  6. 43
    26
      thesisenv/lib/python3.6/site-packages/pkg_resources/__init__.py
  7. 71
    15
      thesisenv/lib/python3.6/site-packages/pkg_resources/_vendor/appdirs.py
  8. 39
    15
      thesisenv/lib/python3.6/site-packages/pkg_resources/_vendor/pyparsing.py
  9. 1
    1
      thesisenv/lib/python3.6/site-packages/pkg_resources/extern/__init__.py
  10. 3
    2
      thesisenv/lib/python3.6/site-packages/pkg_resources/py31compat.py
  11. 0
    36
      thesisenv/lib/python3.6/site-packages/setuptools-39.0.1.dist-info/DESCRIPTION.rst
  12. 0
    1
      thesisenv/lib/python3.6/site-packages/setuptools-39.0.1.dist-info/INSTALLER
  13. 0
    19
      thesisenv/lib/python3.6/site-packages/setuptools-39.0.1.dist-info/LICENSE.txt
  14. 0
    71
      thesisenv/lib/python3.6/site-packages/setuptools-39.0.1.dist-info/METADATA
  15. 0
    188
      thesisenv/lib/python3.6/site-packages/setuptools-39.0.1.dist-info/RECORD
  16. 0
    6
      thesisenv/lib/python3.6/site-packages/setuptools-39.0.1.dist-info/WHEEL
  17. 0
    2
      thesisenv/lib/python3.6/site-packages/setuptools-39.0.1.dist-info/dependency_links.txt
  18. 0
    65
      thesisenv/lib/python3.6/site-packages/setuptools-39.0.1.dist-info/entry_points.txt
  19. 0
    1
      thesisenv/lib/python3.6/site-packages/setuptools-39.0.1.dist-info/metadata.json
  20. 0
    3
      thesisenv/lib/python3.6/site-packages/setuptools-39.0.1.dist-info/top_level.txt
  21. 0
    1
      thesisenv/lib/python3.6/site-packages/setuptools-39.0.1.dist-info/zip-safe
  22. 13
    2
      thesisenv/lib/python3.6/site-packages/setuptools/__init__.py
  23. 39
    15
      thesisenv/lib/python3.6/site-packages/setuptools/_vendor/pyparsing.py
  24. 14
    1
      thesisenv/lib/python3.6/site-packages/setuptools/build_meta.py
  25. 1
    1
      thesisenv/lib/python3.6/site-packages/setuptools/command/bdist_egg.py
  26. 1
    11
      thesisenv/lib/python3.6/site-packages/setuptools/command/build_ext.py
  27. 3
    1
      thesisenv/lib/python3.6/site-packages/setuptools/command/develop.py
  28. 10
    7
      thesisenv/lib/python3.6/site-packages/setuptools/command/easy_install.py
  29. 34
    25
      thesisenv/lib/python3.6/site-packages/setuptools/command/egg_info.py
  30. 11
    3
      thesisenv/lib/python3.6/site-packages/setuptools/command/register.py
  31. 3
    1
      thesisenv/lib/python3.6/site-packages/setuptools/command/test.py
  32. 11
    0
      thesisenv/lib/python3.6/site-packages/setuptools/command/upload.py
  33. 56
    12
      thesisenv/lib/python3.6/site-packages/setuptools/config.py
  34. 23
    22
      thesisenv/lib/python3.6/site-packages/setuptools/dist.py
  35. 1
    1
      thesisenv/lib/python3.6/site-packages/setuptools/extern/__init__.py
  36. 0
    18
      thesisenv/lib/python3.6/site-packages/setuptools/monkey.py
  37. 1
    2
      thesisenv/lib/python3.6/site-packages/setuptools/msvc.py
  38. 17
    9
      thesisenv/lib/python3.6/site-packages/setuptools/package_index.py
  39. 7
    4
      thesisenv/lib/python3.6/site-packages/setuptools/pep425tags.py
  40. 3
    12
      thesisenv/lib/python3.6/site-packages/setuptools/py31compat.py
  41. 2
    1
      thesisenv/lib/python3.6/site-packages/setuptools/py33compat.py
  42. 2
    1
      thesisenv/lib/python3.6/site-packages/setuptools/script (dev).tmpl
  43. 1
    1
      thesisenv/lib/python3.6/site-packages/setuptools/site-patch.py
  44. 131
    84
      thesisenv/lib/python3.6/site-packages/setuptools/wheel.py

+ 4
- 0
application/templates/blog_search_list_view.html View File

@@ -10,4 +10,8 @@
{% endfor %}
</ul>
</div>
{% include "taggit_templatetags2/tagcanvas_include_js_static.html" %}
{% include_tagcanvas 'tag-cloud' '200 px' '200 px' 'taggit_templatetags2' 'application.Post' %}
<div id="tag-cloud">
</div>
{% endblock %}

+ 3
- 0
application/urls.py View File

@@ -1,4 +1,6 @@
from django.conf.urls import url
from django.conf.urls import include
from taggit_templatetags2 import urls as taggit_templatetags2_urls
from . import views

urlpatterns = [
@@ -11,5 +13,6 @@ urlpatterns = [
url(r'^drafts/$', views.post_draft_list, name='post_draft_list'),
url(r'^post/(?P<pk>\d+)/publish/$', views.post_publish, name='post_publish'),
url(r'^post/(?P<pk>\d+)/remove/$', views.post_remove, name='post_remove'),
url(r'^tags/', include('taggit_templatetags2.urls')),
]


+ 4
- 1
application/views.py View File

@@ -7,6 +7,7 @@ from django.contrib.auth.decorators import login_required
from django.contrib.admin.views.decorators import staff_member_required
from django.contrib.auth import authenticate, login, logout
from django.db.models import Q
from taggit_templatetags2.views import TagCanvasListView

import logging
import mysite.settings
@@ -120,5 +121,7 @@ def student_page(request):


def blog_search_list_view(request):

return render(request, 'blog_search_list_view.html', {})

def tag_cloud(request):
return render(request, 'tag_cloud.html', {})

+ 7
- 6
thesisenv/bin/easy_install View File

@@ -1,11 +1,12 @@
#!/Users/Esthi/thesis_ek/thesisenv/bin/python3
# -*- coding: utf-8 -*-
#!/Users/Esthi/thesis_ek/thesisenv/bin/python
# EASY-INSTALL-ENTRY-SCRIPT: 'setuptools==33.1.1','console_scripts','easy_install'
__requires__ = 'setuptools==33.1.1'
import re
import sys

from setuptools.command.easy_install import main
from pkg_resources import load_entry_point

if __name__ == '__main__':
sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0])
sys.exit(main())
sys.exit(
load_entry_point('setuptools==33.1.1', 'console_scripts', 'easy_install')()
)

+ 7
- 6
thesisenv/bin/easy_install-3.6 View File

@@ -1,11 +1,12 @@
#!/Users/Esthi/thesis_ek/thesisenv/bin/python3
# -*- coding: utf-8 -*-
#!/Users/Esthi/thesis_ek/thesisenv/bin/python
# EASY-INSTALL-ENTRY-SCRIPT: 'setuptools==33.1.1','console_scripts','easy_install-3.6'
__requires__ = 'setuptools==33.1.1'
import re
import sys

from setuptools.command.easy_install import main
from pkg_resources import load_entry_point

if __name__ == '__main__':
sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0])
sys.exit(main())
sys.exit(
load_entry_point('setuptools==33.1.1', 'console_scripts', 'easy_install-3.6')()
)

+ 43
- 26
thesisenv/lib/python3.6/site-packages/pkg_resources/__init__.py View File

@@ -47,6 +47,11 @@ except ImportError:
# Python 3.2 compatibility
import imp as _imp

try:
FileExistsError
except NameError:
FileExistsError = OSError

from pkg_resources.extern import six
from pkg_resources.extern.six.moves import urllib, map, filter

@@ -78,8 +83,11 @@ __import__('pkg_resources.extern.packaging.requirements')
__import__('pkg_resources.extern.packaging.markers')


if (3, 0) < sys.version_info < (3, 3):
raise RuntimeError("Python 3.3 or later is required")
__metaclass__ = type


if (3, 0) < sys.version_info < (3, 4):
raise RuntimeError("Python 3.4 or later is required")

if six.PY2:
# Those builtin exceptions are only defined in Python 3
@@ -377,11 +385,7 @@ def get_build_platform():
XXX Currently this is the same as ``distutils.util.get_platform()``, but it
needs some hacks for Linux and Mac OS X.
"""
try:
# Python 2.7 or >=3.2
from sysconfig import get_platform
except ImportError:
from distutils.util import get_platform
from sysconfig import get_platform

plat = get_platform()
if sys.platform == "darwin" and not plat.startswith('macosx-'):
@@ -541,7 +545,7 @@ class IResourceProvider(IMetadataProvider):
"""List of resource names in the directory (like ``os.listdir()``)"""


class WorkingSet(object):
class WorkingSet:
"""A collection of active distributions on sys.path (or a similar list)"""

def __init__(self, entries=None):
@@ -641,13 +645,12 @@ class WorkingSet(object):
distributions in the working set, otherwise only ones matching
both `group` and `name` are yielded (in distribution order).
"""
for dist in self:
entries = dist.get_entry_map(group)
if name is None:
for ep in entries.values():
yield ep
elif name in entries:
yield entries[name]
return (
entry
for dist in self
for entry in dist.get_entry_map(group).values()
if name is None or name == entry.name
)

def run_script(self, requires, script_name):
"""Locate distribution for `requires` and run `script_name` script"""
@@ -948,7 +951,7 @@ class _ReqExtras(dict):
return not req.marker or any(extra_evals)


class Environment(object):
class Environment:
"""Searchable snapshot of distributions on a search path"""

def __init__(
@@ -963,7 +966,7 @@ class Environment(object):
`platform` is an optional string specifying the name of the platform
that platform-specific distributions must be compatible with. If
unspecified, it defaults to the current platform. `python` is an
optional string naming the desired version of Python (e.g. ``'3.3'``);
optional string naming the desired version of Python (e.g. ``'3.6'``);
it defaults to the current version.

You may explicitly set `platform` (and/or `python`) to ``None`` if you
@@ -1518,12 +1521,10 @@ class DefaultProvider(EggProvider):

@classmethod
def _register(cls):
loader_cls = getattr(
importlib_machinery,
'SourceFileLoader',
type(None),
)
register_loader_type(loader_cls, cls)
loader_names = 'SourceFileLoader', 'SourcelessFileLoader',
for name in loader_names:
loader_cls = getattr(importlib_machinery, name, type(None))
register_loader_type(loader_cls, cls)


DefaultProvider._register()
@@ -2285,7 +2286,7 @@ EGG_NAME = re.compile(
).match


class EntryPoint(object):
class EntryPoint:
"""Object representing an advertised importable object"""

def __init__(self, name, module_name, attrs=(), extras=(), dist=None):
@@ -2439,7 +2440,7 @@ def _version_from_file(lines):
return safe_version(value.strip()) or None


class Distribution(object):
class Distribution:
"""Wrap an actual or potential sys.path entry w/metadata"""
PKG_INFO = 'PKG-INFO'

@@ -2669,6 +2670,19 @@ class Distribution(object):
raise AttributeError(attr)
return getattr(self._provider, attr)

def __dir__(self):
return list(
set(super(Distribution, self).__dir__())
| set(
attr for attr in self._provider.__dir__()
if not attr.startswith('_')
)
)

if not hasattr(object, '__dir__'):
# python 2.7 not supported
del __dir__

@classmethod
def from_filename(cls, filename, metadata=None, **kw):
return cls.from_location(
@@ -3020,7 +3034,10 @@ def _bypass_ensure_directory(path):
dirname, filename = split(path)
if dirname and filename and not isdir(dirname):
_bypass_ensure_directory(dirname)
mkdir(dirname, 0o755)
try:
mkdir(dirname, 0o755)
except FileExistsError:
pass


def split_sections(s):

+ 71
- 15
thesisenv/lib/python3.6/site-packages/pkg_resources/_vendor/appdirs.py View File

@@ -13,7 +13,7 @@ See <http://github.com/ActiveState/appdirs> for details and usage.
# - Mac OS X: http://developer.apple.com/documentation/MacOSX/Conceptual/BPFileSystem/index.html
# - XDG spec for Un*x: http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html

__version_info__ = (1, 4, 0)
__version_info__ = (1, 4, 3)
__version__ = '.'.join(map(str, __version_info__))


@@ -98,7 +98,7 @@ def user_data_dir(appname=None, appauthor=None, version=None, roaming=False):


def site_data_dir(appname=None, appauthor=None, version=None, multipath=False):
"""Return full path to the user-shared data dir for this application.
r"""Return full path to the user-shared data dir for this application.

"appname" is the name of application.
If None, just the system directory is returned.
@@ -117,7 +117,7 @@ def site_data_dir(appname=None, appauthor=None, version=None, multipath=False):
returned, or '/usr/local/share/<AppName>',
if XDG_DATA_DIRS is not set

Typical user data directories are:
Typical site data directories are:
Mac OS X: /Library/Application Support/<AppName>
Unix: /usr/local/share/<AppName> or /usr/share/<AppName>
Win XP: C:\Documents and Settings\All Users\Application Data\<AppAuthor>\<AppName>
@@ -184,13 +184,13 @@ def user_config_dir(appname=None, appauthor=None, version=None, roaming=False):
<http://technet.microsoft.com/en-us/library/cc766489(WS.10).aspx>
for a discussion of issues.

Typical user data directories are:
Typical user config directories are:
Mac OS X: same as user_data_dir
Unix: ~/.config/<AppName> # or in $XDG_CONFIG_HOME, if defined
Win *: same as user_data_dir

For Unix, we follow the XDG spec and support $XDG_CONFIG_HOME.
That means, by deafult "~/.config/<AppName>".
That means, by default "~/.config/<AppName>".
"""
if system in ["win32", "darwin"]:
path = user_data_dir(appname, appauthor, None, roaming)
@@ -204,7 +204,7 @@ def user_config_dir(appname=None, appauthor=None, version=None, roaming=False):


def site_config_dir(appname=None, appauthor=None, version=None, multipath=False):
"""Return full path to the user-shared data dir for this application.
r"""Return full path to the user-shared data dir for this application.

"appname" is the name of application.
If None, just the system directory is returned.
@@ -222,7 +222,7 @@ def site_config_dir(appname=None, appauthor=None, version=None, multipath=False)
returned. By default, the first item from XDG_CONFIG_DIRS is
returned, or '/etc/xdg/<AppName>', if XDG_CONFIG_DIRS is not set

Typical user data directories are:
Typical site config directories are:
Mac OS X: same as site_data_dir
Unix: /etc/xdg/<AppName> or $XDG_CONFIG_DIRS[i]/<AppName> for each value in
$XDG_CONFIG_DIRS
@@ -311,6 +311,48 @@ def user_cache_dir(appname=None, appauthor=None, version=None, opinion=True):
return path


def user_state_dir(appname=None, appauthor=None, version=None, roaming=False):
r"""Return full path to the user-specific state dir for this application.

"appname" is the name of application.
If None, just the system directory is returned.
"appauthor" (only used on Windows) is the name of the
appauthor or distributing body for this application. Typically
it is the owning company name. This falls back to appname. You may
pass False to disable it.
"version" is an optional version path element to append to the
path. You might want to use this if you want multiple versions
of your app to be able to run independently. If used, this
would typically be "<major>.<minor>".
Only applied when appname is present.
"roaming" (boolean, default False) can be set True to use the Windows
roaming appdata directory. That means that for users on a Windows
network setup for roaming profiles, this user data will be
sync'd on login. See
<http://technet.microsoft.com/en-us/library/cc766489(WS.10).aspx>
for a discussion of issues.

Typical user state directories are:
Mac OS X: same as user_data_dir
Unix: ~/.local/state/<AppName> # or in $XDG_STATE_HOME, if defined
Win *: same as user_data_dir

For Unix, we follow this Debian proposal <https://wiki.debian.org/XDGBaseDirectorySpecification#state>
to extend the XDG spec and support $XDG_STATE_HOME.

That means, by default "~/.local/state/<AppName>".
"""
if system in ["win32", "darwin"]:
path = user_data_dir(appname, appauthor, None, roaming)
else:
path = os.getenv('XDG_STATE_HOME', os.path.expanduser("~/.local/state"))
if appname:
path = os.path.join(path, appname)
if appname and version:
path = os.path.join(path, version)
return path


def user_log_dir(appname=None, appauthor=None, version=None, opinion=True):
r"""Return full path to the user-specific log dir for this application.

@@ -329,7 +371,7 @@ def user_log_dir(appname=None, appauthor=None, version=None, opinion=True):
"Logs" to the base app data dir for Windows, and "log" to the
base cache dir for Unix. See discussion below.

Typical user cache directories are:
Typical user log directories are:
Mac OS X: ~/Library/Logs/<AppName>
Unix: ~/.cache/<AppName>/log # or under $XDG_CACHE_HOME if defined
Win XP: C:\Documents and Settings\<username>\Local Settings\Application Data\<AppAuthor>\<AppName>\Logs
@@ -364,8 +406,8 @@ def user_log_dir(appname=None, appauthor=None, version=None, opinion=True):

class AppDirs(object):
"""Convenience wrapper for getting application dirs."""
def __init__(self, appname, appauthor=None, version=None, roaming=False,
multipath=False):
def __init__(self, appname=None, appauthor=None, version=None,
roaming=False, multipath=False):
self.appname = appname
self.appauthor = appauthor
self.version = version
@@ -397,6 +439,11 @@ class AppDirs(object):
return user_cache_dir(self.appname, self.appauthor,
version=self.version)

@property
def user_state_dir(self):
return user_state_dir(self.appname, self.appauthor,
version=self.version)

@property
def user_log_dir(self):
return user_log_dir(self.appname, self.appauthor,
@@ -410,7 +457,10 @@ def _get_win_folder_from_registry(csidl_name):
registry for this guarantees us the correct answer for all CSIDL_*
names.
"""
import _winreg
if PY3:
import winreg as _winreg
else:
import _winreg

shell_folder_name = {
"CSIDL_APPDATA": "AppData",
@@ -500,7 +550,7 @@ def _get_win_folder_with_jna(csidl_name):
if has_high_char:
buf = array.zeros('c', buf_size)
kernel = win32.Kernel32.INSTANCE
if kernal.GetShortPathName(dir, buf, buf_size):
if kernel.GetShortPathName(dir, buf, buf_size):
dir = jna.Native.toString(buf.tostring()).rstrip("\0")

return dir
@@ -527,9 +577,15 @@ if __name__ == "__main__":
appname = "MyApp"
appauthor = "MyCompany"

props = ("user_data_dir", "site_data_dir",
"user_config_dir", "site_config_dir",
"user_cache_dir", "user_log_dir")
props = ("user_data_dir",
"user_config_dir",
"user_cache_dir",
"user_state_dir",
"user_log_dir",
"site_data_dir",
"site_config_dir")

print("-- app dirs %s --" % __version__)

print("-- app dirs (with optional 'version')")
dirs = AppDirs(appname, appauthor, version="1.0")

+ 39
- 15
thesisenv/lib/python3.6/site-packages/pkg_resources/_vendor/pyparsing.py View File

@@ -60,8 +60,8 @@ The pyparsing module handles some of the problems that are typically vexing when
- embedded comments
"""
__version__ = "2.1.10"
__versionTime__ = "07 Oct 2016 01:31 UTC"
__version__ = "2.2.0"
__versionTime__ = "06 Mar 2017 02:06 UTC"
__author__ = "Paul McGuire <ptmcg@users.sourceforge.net>"
import string
@@ -144,7 +144,7 @@ else:
except UnicodeEncodeError:
# Else encode it
ret = unicode(obj).encode(sys.getdefaultencoding(), 'xmlcharrefreplace')
xmlcharref = Regex('&#\d+;')
xmlcharref = Regex(r'&#\d+;')
xmlcharref.setParseAction(lambda t: '\\u' + hex(int(t[0][2:-1]))[2:])
return xmlcharref.transformString(ret)
@@ -809,7 +809,7 @@ class ParseResults(object):
return None
def getName(self):
"""
r"""
Returns the results name for this token expression. Useful when several
different expressions might match at a particular location.
@@ -1226,7 +1226,7 @@ class ParserElement(object):
def setParseAction( self, *fns, **kwargs ):
"""
Define action to perform when successfully matching parse element definition.
Define one or more actions to perform when successfully matching parse element definition.
Parse action fn is a callable method with 0-3 arguments, called as C{fn(s,loc,toks)},
C{fn(loc,toks)}, C{fn(toks)}, or just C{fn()}, where:
- s = the original string being parsed (see note below)
@@ -1264,7 +1264,7 @@ class ParserElement(object):
def addParseAction( self, *fns, **kwargs ):
"""
Add parse action to expression's list of parse actions. See L{I{setParseAction}<setParseAction>}.
Add one or more parse actions to expression's list of parse actions. See L{I{setParseAction}<setParseAction>}.
See examples in L{I{copy}<copy>}.
"""
@@ -1443,10 +1443,14 @@ class ParserElement(object):
def clear(self):
cache.clear()
def cache_len(self):
return len(cache)
self.get = types.MethodType(get, self)
self.set = types.MethodType(set, self)
self.clear = types.MethodType(clear, self)
self.__len__ = types.MethodType(cache_len, self)
if _OrderedDict is not None:
class _FifoCache(object):
@@ -1460,15 +1464,22 @@ class ParserElement(object):
def set(self, key, value):
cache[key] = value
if len(cache) > size:
cache.popitem(False)
while len(cache) > size:
try:
cache.popitem(False)
except KeyError:
pass
def clear(self):
cache.clear()
def cache_len(self):
return len(cache)
self.get = types.MethodType(get, self)
self.set = types.MethodType(set, self)
self.clear = types.MethodType(clear, self)
self.__len__ = types.MethodType(cache_len, self)
else:
class _FifoCache(object):
@@ -1483,7 +1494,7 @@ class ParserElement(object):
def set(self, key, value):
cache[key] = value
if len(cache) > size:
while len(key_fifo) > size:
cache.pop(key_fifo.popleft(), None)
key_fifo.append(key)
@@ -1491,9 +1502,13 @@ class ParserElement(object):
cache.clear()
key_fifo.clear()
def cache_len(self):
return len(cache)
self.get = types.MethodType(get, self)
self.set = types.MethodType(set, self)
self.clear = types.MethodType(clear, self)
self.__len__ = types.MethodType(cache_len, self)
# argument cache for optimizing repeated calls when backtracking through recursive expressions
packrat_cache = {} # this is set later by enabledPackrat(); this is here so that resetCache() doesn't fail
@@ -1743,8 +1758,12 @@ class ParserElement(object):
cap_word = Word(alphas.upper(), alphas.lower())
print(cap_word.searchString("More than Iron, more than Lead, more than Gold I need Electricity"))
# the sum() builtin can be used to merge results into a single ParseResults object
print(sum(cap_word.searchString("More than Iron, more than Lead, more than Gold I need Electricity")))
prints::
['More', 'Iron', 'Lead', 'Gold', 'I']
[['More'], ['Iron'], ['Lead'], ['Gold'], ['I'], ['Electricity']]
['More', 'Iron', 'Lead', 'Gold', 'I', 'Electricity']
"""
try:
return ParseResults([ t for t,s,e in self.scanString( instring, maxMatches ) ])
@@ -1819,7 +1838,7 @@ class ParserElement(object):
warnings.warn("Cannot combine element of type %s with ParserElement" % type(other),
SyntaxWarning, stacklevel=2)
return None
return And( [ self, And._ErrorStop(), other ] )
return self + And._ErrorStop() + other
def __rsub__(self, other ):
"""
@@ -2722,7 +2741,7 @@ class Word(Token):
class Regex(Token):
"""
r"""
Token for matching strings that match a given regular expression.
Defined with string specifying the regular expression in a form recognized by the inbuilt Python re module.
If the given regex contains named groups (defined using C{(?P<name>...)}), these will be preserved as
@@ -2911,7 +2930,7 @@ class QuotedString(Token):
# replace escaped characters
if self.escChar:
ret = re.sub(self.escCharReplacePattern,"\g<1>",ret)
ret = re.sub(self.escCharReplacePattern, r"\g<1>", ret)
# replace escaped quotes
if self.escQuote:
@@ -5020,7 +5039,9 @@ def infixNotation( baseExpr, opList, lpar=Suppress('('), rpar=Suppress(')') ):
constants C{opAssoc.RIGHT} and C{opAssoc.LEFT}.
- parseAction is the parse action to be associated with
expressions matching this operator expression (the
parse action tuple member may be omitted)
parse action tuple member may be omitted); if the parse action
is passed a tuple or list of functions, this is equivalent to
calling C{setParseAction(*fn)} (L{ParserElement.setParseAction})
- lpar - expression for matching left-parentheses (default=C{Suppress('(')})
- rpar - expression for matching right-parentheses (default=C{Suppress(')')})
@@ -5093,7 +5114,10 @@ def infixNotation( baseExpr, opList, lpar=Suppress('('), rpar=Suppress(')') ):
else:
raise ValueError("operator must indicate right or left associativity")
if pa:
matchExpr.setParseAction( pa )
if isinstance(pa, (tuple, list)):
matchExpr.setParseAction(*pa)
else:
matchExpr.setParseAction(pa)
thisExpr <<= ( matchExpr.setName(termName) | lastExpr )
lastExpr = thisExpr
ret <<= lastExpr

+ 1
- 1
thesisenv/lib/python3.6/site-packages/pkg_resources/extern/__init__.py View File

@@ -48,7 +48,7 @@ class VendorImporter:
# on later Python versions to cause relative imports
# in the vendor package to resolve the same modules
# as those going through this importer.
if sys.version_info > (3, 3):
if prefix and sys.version_info > (3, 3):
del sys.modules[extant]
return mod
except ImportError:

+ 3
- 2
thesisenv/lib/python3.6/site-packages/pkg_resources/py31compat.py View File

@@ -2,6 +2,8 @@ import os
import errno
import sys

from .extern import six


def _makedirs_31(path, exist_ok=False):
try:
@@ -15,8 +17,7 @@ def _makedirs_31(path, exist_ok=False):
# and exists_ok considerations are disentangled.
# See https://github.com/pypa/setuptools/pull/1083#issuecomment-315168663
needs_makedirs = (
sys.version_info < (3, 2, 5) or
(3, 3) <= sys.version_info < (3, 3, 6) or
six.PY2 or
(3, 4) <= sys.version_info < (3, 4, 1)
)
makedirs = _makedirs_31 if needs_makedirs else os.makedirs

+ 0
- 36
thesisenv/lib/python3.6/site-packages/setuptools-39.0.1.dist-info/DESCRIPTION.rst View File

@@ -1,36 +0,0 @@
.. image:: https://img.shields.io/pypi/v/setuptools.svg
:target: https://pypi.org/project/setuptools

.. image:: https://readthedocs.org/projects/setuptools/badge/?version=latest
:target: https://setuptools.readthedocs.io

.. image:: https://img.shields.io/travis/pypa/setuptools/master.svg?label=Linux%20build%20%40%20Travis%20CI
:target: https://travis-ci.org/pypa/setuptools

.. image:: https://img.shields.io/appveyor/ci/jaraco/setuptools/master.svg?label=Windows%20build%20%40%20Appveyor
:target: https://ci.appveyor.com/project/jaraco/setuptools/branch/master

.. image:: https://img.shields.io/pypi/pyversions/setuptools.svg

See the `Installation Instructions
<https://packaging.python.org/installing/>`_ in the Python Packaging
User's Guide for instructions on installing, upgrading, and uninstalling
Setuptools.

The project is `maintained at GitHub <https://github.com/pypa/setuptools>`_.

Questions and comments should be directed to the `distutils-sig
mailing list <http://mail.python.org/pipermail/distutils-sig/>`_.
Bug reports and especially tested patches may be
submitted directly to the `bug tracker
<https://github.com/pypa/setuptools/issues>`_.


Code of Conduct
---------------

Everyone interacting in the setuptools project's codebases, issue trackers,
chat rooms, and mailing lists is expected to follow the
`PyPA Code of Conduct <https://www.pypa.io/en/latest/code-of-conduct/>`_.



+ 0
- 1
thesisenv/lib/python3.6/site-packages/setuptools-39.0.1.dist-info/INSTALLER View File

@@ -1 +0,0 @@
pip

+ 0
- 19
thesisenv/lib/python3.6/site-packages/setuptools-39.0.1.dist-info/LICENSE.txt View File

@@ -1,19 +0,0 @@
Copyright (C) 2016 Jason R Coombs <jaraco@jaraco.com>

Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
of the Software, and to permit persons to whom the Software is furnished to do
so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

+ 0
- 71
thesisenv/lib/python3.6/site-packages/setuptools-39.0.1.dist-info/METADATA View File

@@ -1,71 +0,0 @@
Metadata-Version: 2.0
Name: setuptools
Version: 39.0.1
Summary: Easily download, build, install, upgrade, and uninstall Python packages
Home-page: https://github.com/pypa/setuptools
Author: Python Packaging Authority
Author-email: distutils-sig@python.org
License: UNKNOWN
Project-URL: Documentation, https://setuptools.readthedocs.io/
Keywords: CPAN PyPI distutils eggs package management
Platform: UNKNOWN
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 2
Classifier: Programming Language :: Python :: 2.7
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.3
Classifier: Programming Language :: Python :: 3.4
Classifier: Programming Language :: Python :: 3.5
Classifier: Programming Language :: Python :: 3.6
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: System :: Archiving :: Packaging
Classifier: Topic :: System :: Systems Administration
Classifier: Topic :: Utilities
Requires-Python: >=2.7,!=3.0.*,!=3.1.*,!=3.2.*
Description-Content-Type: text/x-rst; charset=UTF-8
Provides-Extra: certs
Provides-Extra: ssl
Provides-Extra: certs
Requires-Dist: certifi (==2016.9.26); extra == 'certs'
Provides-Extra: ssl
Requires-Dist: wincertstore (==0.2); sys_platform=='win32' and extra == 'ssl'

.. image:: https://img.shields.io/pypi/v/setuptools.svg
:target: https://pypi.org/project/setuptools

.. image:: https://readthedocs.org/projects/setuptools/badge/?version=latest
:target: https://setuptools.readthedocs.io

.. image:: https://img.shields.io/travis/pypa/setuptools/master.svg?label=Linux%20build%20%40%20Travis%20CI
:target: https://travis-ci.org/pypa/setuptools

.. image:: https://img.shields.io/appveyor/ci/jaraco/setuptools/master.svg?label=Windows%20build%20%40%20Appveyor
:target: https://ci.appveyor.com/project/jaraco/setuptools/branch/master

.. image:: https://img.shields.io/pypi/pyversions/setuptools.svg

See the `Installation Instructions
<https://packaging.python.org/installing/>`_ in the Python Packaging
User's Guide for instructions on installing, upgrading, and uninstalling
Setuptools.

The project is `maintained at GitHub <https://github.com/pypa/setuptools>`_.

Questions and comments should be directed to the `distutils-sig
mailing list <http://mail.python.org/pipermail/distutils-sig/>`_.
Bug reports and especially tested patches may be
submitted directly to the `bug tracker
<https://github.com/pypa/setuptools/issues>`_.


Code of Conduct
---------------

Everyone interacting in the setuptools project's codebases, issue trackers,
chat rooms, and mailing lists is expected to follow the
`PyPA Code of Conduct <https://www.pypa.io/en/latest/code-of-conduct/>`_.



+ 0
- 188
thesisenv/lib/python3.6/site-packages/setuptools-39.0.1.dist-info/RECORD View File

@@ -1,188 +0,0 @@
easy_install.py,sha256=MDC9vt5AxDsXX5qcKlBz2TnW6Tpuv_AobnfhCJ9X3PM,126
pkg_resources/__init__.py,sha256=YQ4_WQnPztMsUy1yuvp7ZRBPK9IhOyhgosLpvkFso1I,103551
pkg_resources/py31compat.py,sha256=-ysVqoxLetAnL94uM0kHkomKQTC1JZLN2ZUjqUhMeKE,600
pkg_resources/_vendor/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
pkg_resources/_vendor/appdirs.py,sha256=tgGaL0m4Jo2VeuGfoOOifLv7a7oUEJu2n1vRkqoPw-0,22374
pkg_resources/_vendor/pyparsing.py,sha256=PifeLY3-WhIcBVzLtv0U4T_pwDtPruBhBCkg5vLqa28,229867
pkg_resources/_vendor/six.py,sha256=A6hdJZVjI3t_geebZ9BzUvwRrIXo0lfwzQlM2LcKyas,30098
pkg_resources/_vendor/packaging/__about__.py,sha256=zkcCPTN_6TcLW0Nrlg0176-R1QQ_WVPTm8sz1R4-HjM,720
pkg_resources/_vendor/packaging/__init__.py,sha256=_vNac5TrzwsrzbOFIbF-5cHqc_Y2aPT2D7zrIR06BOo,513
pkg_resources/_vendor/packaging/_compat.py,sha256=Vi_A0rAQeHbU-a9X0tt1yQm9RqkgQbDSxzRw8WlU9kA,860
pkg_resources/_vendor/packaging/_structures.py,sha256=RImECJ4c_wTlaTYYwZYLHEiebDMaAJmK1oPARhw1T5o,1416
pkg_resources/_vendor/packaging/markers.py,sha256=uEcBBtGvzqltgnArqb9c4RrcInXezDLos14zbBHhWJo,8248
pkg_resources/_vendor/packaging/requirements.py,sha256=SikL2UynbsT0qtY9ltqngndha_sfo0w6XGFhAhoSoaQ,4355
pkg_resources/_vendor/packaging/specifiers.py,sha256=SAMRerzO3fK2IkFZCaZkuwZaL_EGqHNOz4pni4vhnN0,28025
pkg_resources/_vendor/packaging/utils.py,sha256=3m6WvPm6NNxE8rkTGmn0r75B_GZSGg7ikafxHsBN1WA,421
pkg_resources/_vendor/packaging/version.py,sha256=OwGnxYfr2ghNzYx59qWIBkrK3SnB6n-Zfd1XaLpnnM0,11556
pkg_resources/extern/__init__.py,sha256=JUtlHHvlxHSNuB4pWqNjcx7n6kG-fwXg7qmJ2zNJlIY,2487
setuptools/__init__.py,sha256=WWIdCbFJnZ9fZoaWDN_x1vDA_Rkm-Sc15iKvPtIYKFs,5700
setuptools/archive_util.py,sha256=kw8Ib_lKjCcnPKNbS7h8HztRVK0d5RacU3r_KRdVnmM,6592
setuptools/build_meta.py,sha256=FllaKTr1vSJyiUeRjVJEZmeEaRzhYueNlimtcwaJba8,5671
setuptools/cli-32.exe,sha256=dfEuovMNnA2HLa3jRfMPVi5tk4R7alCbpTvuxtCyw0Y,65536
setuptools/cli-64.exe,sha256=KLABu5pyrnokJCv6skjXZ6GsXeyYHGcqOUT3oHI3Xpo,74752
setuptools/cli.exe,sha256=dfEuovMNnA2HLa3jRfMPVi5tk4R7alCbpTvuxtCyw0Y,65536
setuptools/config.py,sha256=tVYBM3w1U_uBRRTOZydflxyZ_IrTJT5odlZz3cbuhSw,16381
setuptools/dep_util.py,sha256=fgixvC1R7sH3r13ktyf7N0FALoqEXL1cBarmNpSEoWg,935
setuptools/depends.py,sha256=hC8QIDcM3VDpRXvRVA6OfL9AaQfxvhxHcN_w6sAyNq8,5837
setuptools/dist.py,sha256=_wCSFiGqwyaOUTj0tBjqZF2bqW9aEVu4W1D4gmsveno,42514
setuptools/extension.py,sha256=uc6nHI-MxwmNCNPbUiBnybSyqhpJqjbhvOQ-emdvt_E,1729
setuptools/glibc.py,sha256=X64VvGPL2AbURKwYRsWJOXXGAYOiF_v2qixeTkAULuU,3146
setuptools/glob.py,sha256=Y-fpv8wdHZzv9DPCaGACpMSBWJ6amq_1e0R_i8_el4w,5207
setuptools/gui-32.exe,sha256=XBr0bHMA6Hpz2s9s9Bzjl-PwXfa9nH4ie0rFn4V2kWA,65536
setuptools/gui-64.exe,sha256=aYKMhX1IJLn4ULHgWX0sE0yREUt6B3TEHf_jOw6yNyE,75264
setuptools/gui.exe,sha256=XBr0bHMA6Hpz2s9s9Bzjl-PwXfa9nH4ie0rFn4V2kWA,65536
setuptools/launch.py,sha256=sd7ejwhBocCDx_wG9rIs0OaZ8HtmmFU8ZC6IR_S0Lvg,787
setuptools/lib2to3_ex.py,sha256=t5e12hbR2pi9V4ezWDTB4JM-AISUnGOkmcnYHek3xjg,2013
setuptools/monkey.py,sha256=zZGTH7p0xeXQKLmEwJTPIE4m5m7fJeHoAsxyv5M8e_E,5789
setuptools/msvc.py,sha256=8EiV9ypb3EQJQssPcH1HZbdNsbRvqsFnJ7wPFEGwFIo,40877
setuptools/namespaces.py,sha256=F0Nrbv8KCT2OrO7rwa03om4N4GZKAlnce-rr-cgDQa8,3199
setuptools/package_index.py,sha256=NEsrNXnt_9gGP-nCCYzV-0gk15lXAGO7RghRxpfqLqE,40142
setuptools/pep425tags.py,sha256=NuGMx1gGif7x6iYemh0LfgBr_FZF5GFORIbgmMdU8J4,10882
setuptools/py27compat.py,sha256=3mwxRMDk5Q5O1rSXOERbQDXhFqwDJhhUitfMW_qpUCo,536
setuptools/py31compat.py,sha256=XuU1HCsGE_3zGvBRIhYw2iB-IhCFK4-Pxw_jMiqdNVk,1192
setuptools/py33compat.py,sha256=NKS84nl4LjLIoad6OQfgmygZn4mMvrok_b1N1tzebew,1182
setuptools/py36compat.py,sha256=VUDWxmu5rt4QHlGTRtAFu6W5jvfL6WBjeDAzeoBy0OM,2891
setuptools/sandbox.py,sha256=9UbwfEL5QY436oMI1LtFWohhoZ-UzwHvGyZjUH_qhkw,14276
setuptools/script (dev).tmpl,sha256=f7MR17dTkzaqkCMSVseyOCMVrPVSMdmTQsaB8cZzfuI,201
setuptools/script.tmpl,sha256=WGTt5piezO27c-Dbx6l5Q4T3Ff20A5z7872hv3aAhYY,138
setuptools/site-patch.py,sha256=BVt6yIrDMXJoflA5J6DJIcsJUfW_XEeVhOzelTTFDP4,2307
setuptools/ssl_support.py,sha256=YBDJsCZjSp62CWjxmSkke9kn9rhHHj25Cus6zhJRW3c,8492
setuptools/unicode_utils.py,sha256=NOiZ_5hD72A6w-4wVj8awHFM3n51Kmw1Ic_vx15XFqw,996
setuptools/version.py,sha256=og_cuZQb0QI6ukKZFfZWPlr1HgJBPPn2vO2m_bI9ZTE,144
setuptools/wheel.py,sha256=yF9usxMvpwnymV-oOo5mfDiv3E8jrKkbDEItT7_kjBs,7230
setuptools/windows_support.py,sha256=5GrfqSP2-dLGJoZTq2g6dCKkyQxxa2n5IQiXlJCoYEE,714
setuptools/_vendor/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
setuptools/_vendor/pyparsing.py,sha256=PifeLY3-WhIcBVzLtv0U4T_pwDtPruBhBCkg5vLqa28,229867
setuptools/_vendor/six.py,sha256=A6hdJZVjI3t_geebZ9BzUvwRrIXo0lfwzQlM2LcKyas,30098
setuptools/_vendor/packaging/__about__.py,sha256=zkcCPTN_6TcLW0Nrlg0176-R1QQ_WVPTm8sz1R4-HjM,720
setuptools/_vendor/packaging/__init__.py,sha256=_vNac5TrzwsrzbOFIbF-5cHqc_Y2aPT2D7zrIR06BOo,513
setuptools/_vendor/packaging/_compat.py,sha256=Vi_A0rAQeHbU-a9X0tt1yQm9RqkgQbDSxzRw8WlU9kA,860
setuptools/_vendor/packaging/_structures.py,sha256=RImECJ4c_wTlaTYYwZYLHEiebDMaAJmK1oPARhw1T5o,1416
setuptools/_vendor/packaging/markers.py,sha256=Gvpk9EY20yKaMTiKgQZ8yFEEpodqVgVYtfekoic1Yts,8239
setuptools/_vendor/packaging/requirements.py,sha256=t44M2HVWtr8phIz2OhnILzuGT3rTATaovctV1dpnVIg,4343
setuptools/_vendor/packaging/specifiers.py,sha256=SAMRerzO3fK2IkFZCaZkuwZaL_EGqHNOz4pni4vhnN0,28025
setuptools/_vendor/packaging/utils.py,sha256=3m6WvPm6NNxE8rkTGmn0r75B_GZSGg7ikafxHsBN1WA,421
setuptools/_vendor/packaging/version.py,sha256=OwGnxYfr2ghNzYx59qWIBkrK3SnB6n-Zfd1XaLpnnM0,11556
setuptools/command/__init__.py,sha256=NWzJ0A1BEengZpVeqUyWLNm2bk4P3F4iL5QUErHy7kA,594
setuptools/command/alias.py,sha256=KjpE0sz_SDIHv3fpZcIQK-sCkJz-SrC6Gmug6b9Nkc8,2426
setuptools/command/bdist_egg.py,sha256=RQ9h8BmSVpXKJQST3i_b_sm093Z-aCXbfMBEM2IrI-Q,18185
setuptools/command/bdist_rpm.py,sha256=B7l0TnzCGb-0nLlm6rS00jWLkojASwVmdhW2w5Qz_Ak,1508
setuptools/command/bdist_wininst.py,sha256=_6dz3lpB1tY200LxKPLM7qgwTCceOMgaWFF-jW2-pm0,637
setuptools/command/build_clib.py,sha256=bQ9aBr-5ZSO-9fGsGsDLz0mnnFteHUZnftVLkhvHDq0,4484
setuptools/command/build_ext.py,sha256=PCRAZ2xYnqyEof7EFNtpKYl0sZzT0qdKUNTH3sUdPqk,13173
setuptools/command/build_py.py,sha256=yWyYaaS9F3o9JbIczn064A5g1C5_UiKRDxGaTqYbtLE,9596
setuptools/command/develop.py,sha256=wKbOw2_qUvcDti2lZmtxbDmYb54yAAibExzXIvToz-A,8046
setuptools/command/dist_info.py,sha256=5t6kOfrdgALT-P3ogss6PF9k-Leyesueycuk3dUyZnI,960
setuptools/command/easy_install.py,sha256=I0UOqFrS9U7fmh0uW57IR37keMKSeqXp6z61Oz1nEoA,87054
setuptools/command/egg_info.py,sha256=3b5Y3t_bl_zZRCkmlGi3igvRze9oOaxd-dVf2w1FBOc,24800
setuptools/command/install.py,sha256=a0EZpL_A866KEdhicTGbuyD_TYl1sykfzdrri-zazT4,4683
setuptools/command/install_egg_info.py,sha256=bMgeIeRiXzQ4DAGPV1328kcjwQjHjOWU4FngAWLV78Q,2203
setuptools/command/install_lib.py,sha256=11mxf0Ch12NsuYwS8PHwXBRvyh671QAM4cTRh7epzG0,3840
setuptools/command/install_scripts.py,sha256=UD0rEZ6861mTYhIdzcsqKnUl8PozocXWl9VBQ1VTWnc,2439
setuptools/command/launcher manifest.xml,sha256=xlLbjWrB01tKC0-hlVkOKkiSPbzMml2eOPtJ_ucCnbE,628
setuptools/command/py36compat.py,sha256=SzjZcOxF7zdFUT47Zv2n7AM3H8koDys_0OpS-n9gIfc,4986
setuptools/command/register.py,sha256=bHlMm1qmBbSdahTOT8w6UhA-EgeQIz7p6cD-qOauaiI,270
setuptools/command/rotate.py,sha256=co5C1EkI7P0GGT6Tqz-T2SIj2LBJTZXYELpmao6d4KQ,2164
setuptools/command/saveopts.py,sha256=za7QCBcQimKKriWcoCcbhxPjUz30gSB74zuTL47xpP4,658
setuptools/command/sdist.py,sha256=obDTe2BmWt2PlnFPZZh7e0LWvemEsbCCO9MzhrTZjm8,6711
setuptools/command/setopt.py,sha256=NTWDyx-gjDF-txf4dO577s7LOzHVoKR0Mq33rFxaRr8,5085
setuptools/command/test.py,sha256=MeBAcXUePGjPKqjz4zvTrHatLvNsjlPFcagt3XnFYdk,9214
setuptools/command/upload.py,sha256=i1gfItZ3nQOn5FKXb8tLC2Kd7eKC8lWO4bdE6NqGpE4,1172
setuptools/command/upload_docs.py,sha256=oXiGplM_cUKLwE4CWWw98RzCufAu8tBhMC97GegFcms,7311
setuptools/extern/__init__.py,sha256=2eKMsBMwsZqolIcYBtLZU3t96s6xSTP4PTaNfM5P-I0,2499
setuptools-39.0.1.dist-info/DESCRIPTION.rst,sha256=It3a3GRjT5701mqhrpMcLyW_YS2Dokv-X8zWoTaMRe0,1422
setuptools-39.0.1.dist-info/LICENSE.txt,sha256=wyo6w5WvYyHv0ovnPQagDw22q4h9HCHU_sRhKNIFbVo,1078
setuptools-39.0.1.dist-info/METADATA,sha256=bUSvsq3nbwr4FDQmI4Cu1Sd17lRO4y4MFANuLmZ70gs,2903
setuptools-39.0.1.dist-info/RECORD,,
setuptools-39.0.1.dist-info/WHEEL,sha256=kdsN-5OJAZIiHN-iO4Rhl82KyS0bDWf4uBwMbkNafr8,110
setuptools-39.0.1.dist-info/dependency_links.txt,sha256=HlkCFkoK5TbZ5EMLbLKYhLcY_E31kBWD8TqW2EgmatQ,239
setuptools-39.0.1.dist-info/entry_points.txt,sha256=jBqCYDlVjl__sjYFGXo1JQGIMAYFJE-prYWUtnMZEew,2990
setuptools-39.0.1.dist-info/metadata.json,sha256=kJuHY3HestbJAAqqkLVW75x2Uxgxd2qaz4sQAfFCtXM,4969
setuptools-39.0.1.dist-info/top_level.txt,sha256=2HUXVVwA4Pff1xgTFr3GsTXXKaPaO6vlG6oNJ_4u4Tg,38
setuptools-39.0.1.dist-info/zip-safe,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
../../../bin/easy_install,sha256=1HY9dEozZxF27JG8uBhjj5mzBtKNnJcCvl9bsqfUFVQ,262
../../../bin/easy_install-3.6,sha256=1HY9dEozZxF27JG8uBhjj5mzBtKNnJcCvl9bsqfUFVQ,262
setuptools-39.0.1.dist-info/INSTALLER,sha256=zuuue4knoyJ-UwPPXg8fezS7VCrXJQrAP7zeNuwvFQg,4
__pycache__/easy_install.cpython-36.pyc,,
setuptools/_vendor/packaging/__pycache__/_structures.cpython-36.pyc,,
setuptools/_vendor/packaging/__pycache__/version.cpython-36.pyc,,
setuptools/_vendor/packaging/__pycache__/requirements.cpython-36.pyc,,
setuptools/_vendor/packaging/__pycache__/markers.cpython-36.pyc,,
setuptools/_vendor/packaging/__pycache__/_compat.cpython-36.pyc,,
setuptools/_vendor/packaging/__pycache__/specifiers.cpython-36.pyc,,
setuptools/_vendor/packaging/__pycache__/__about__.cpython-36.pyc,,
setuptools/_vendor/packaging/__pycache__/utils.cpython-36.pyc,,
setuptools/_vendor/packaging/__pycache__/__init__.cpython-36.pyc,,
setuptools/_vendor/__pycache__/six.cpython-36.pyc,,
setuptools/_vendor/__pycache__/__init__.cpython-36.pyc,,
setuptools/_vendor/__pycache__/pyparsing.cpython-36.pyc,,
setuptools/__pycache__/package_index.cpython-36.pyc,,
setuptools/__pycache__/py31compat.cpython-36.pyc,,
setuptools/__pycache__/sandbox.cpython-36.pyc,,
setuptools/__pycache__/windows_support.cpython-36.pyc,,
setuptools/__pycache__/wheel.cpython-36.pyc,,
setuptools/__pycache__/version.cpython-36.pyc,,
setuptools/__pycache__/site-patch.cpython-36.pyc,,
setuptools/__pycache__/launch.cpython-36.pyc,,
setuptools/__pycache__/unicode_utils.cpython-36.pyc,,
setuptools/__pycache__/config.cpython-36.pyc,,
setuptools/__pycache__/glibc.cpython-36.pyc,,
setuptools/__pycache__/ssl_support.cpython-36.pyc,,
setuptools/__pycache__/depends.cpython-36.pyc,,
setuptools/__pycache__/glob.cpython-36.pyc,,
setuptools/__pycache__/msvc.cpython-36.pyc,,
setuptools/__pycache__/py27compat.cpython-36.pyc,,
setuptools/__pycache__/pep425tags.cpython-36.pyc,,
setuptools/__pycache__/py33compat.cpython-36.pyc,,
setuptools/__pycache__/lib2to3_ex.cpython-36.pyc,,
setuptools/__pycache__/monkey.cpython-36.pyc,,
setuptools/__pycache__/py36compat.cpython-36.pyc,,
setuptools/__pycache__/dist.cpython-36.pyc,,
setuptools/__pycache__/build_meta.cpython-36.pyc,,
setuptools/__pycache__/namespaces.cpython-36.pyc,,
setuptools/__pycache__/dep_util.cpython-36.pyc,,
setuptools/__pycache__/__init__.cpython-36.pyc,,
setuptools/__pycache__/extension.cpython-36.pyc,,
setuptools/__pycache__/archive_util.cpython-36.pyc,,
setuptools/command/__pycache__/alias.cpython-36.pyc,,
setuptools/command/__pycache__/register.cpython-36.pyc,,
setuptools/command/__pycache__/install_lib.cpython-36.pyc,,
setuptools/command/__pycache__/setopt.cpython-36.pyc,,
setuptools/command/__pycache__/bdist_egg.cpython-36.pyc,,
setuptools/command/__pycache__/bdist_rpm.cpython-36.pyc,,
setuptools/command/__pycache__/dist_info.cpython-36.pyc,,
setuptools/command/__pycache__/develop.cpython-36.pyc,,
setuptools/command/__pycache__/build_py.cpython-36.pyc,,
setuptools/command/__pycache__/build_clib.cpython-36.pyc,,
setuptools/command/__pycache__/upload.cpython-36.pyc,,
setuptools/command/__pycache__/sdist.cpython-36.pyc,,
setuptools/command/__pycache__/install.cpython-36.pyc,,
setuptools/command/__pycache__/egg_info.cpython-36.pyc,,
setuptools/command/__pycache__/py36compat.cpython-36.pyc,,
setuptools/command/__pycache__/easy_install.cpython-36.pyc,,
setuptools/command/__pycache__/build_ext.cpython-36.pyc,,
setuptools/command/__pycache__/rotate.cpython-36.pyc,,
setuptools/command/__pycache__/upload_docs.cpython-36.pyc,,
setuptools/command/__pycache__/saveopts.cpython-36.pyc,,
setuptools/command/__pycache__/__init__.cpython-36.pyc,,
setuptools/command/__pycache__/test.cpython-36.pyc,,
setuptools/command/__pycache__/bdist_wininst.cpython-36.pyc,,
setuptools/command/__pycache__/install_scripts.cpython-36.pyc,,
setuptools/command/__pycache__/install_egg_info.cpython-36.pyc,,
setuptools/extern/__pycache__/__init__.cpython-36.pyc,,
pkg_resources/_vendor/packaging/__pycache__/_structures.cpython-36.pyc,,
pkg_resources/_vendor/packaging/__pycache__/version.cpython-36.pyc,,
pkg_resources/_vendor/packaging/__pycache__/requirements.cpython-36.pyc,,
pkg_resources/_vendor/packaging/__pycache__/markers.cpython-36.pyc,,
pkg_resources/_vendor/packaging/__pycache__/_compat.cpython-36.pyc,,
pkg_resources/_vendor/packaging/__pycache__/specifiers.cpython-36.pyc,,
pkg_resources/_vendor/packaging/__pycache__/__about__.cpython-36.pyc,,
pkg_resources/_vendor/packaging/__pycache__/utils.cpython-36.pyc,,
pkg_resources/_vendor/packaging/__pycache__/__init__.cpython-36.pyc,,
pkg_resources/_vendor/__pycache__/appdirs.cpython-36.pyc,,
pkg_resources/_vendor/__pycache__/six.cpython-36.pyc,,
pkg_resources/_vendor/__pycache__/__init__.cpython-36.pyc,,
pkg_resources/_vendor/__pycache__/pyparsing.cpython-36.pyc,,
pkg_resources/__pycache__/py31compat.cpython-36.pyc,,
pkg_resources/__pycache__/__init__.cpython-36.pyc,,
pkg_resources/extern/__pycache__/__init__.cpython-36.pyc,,

+ 0
- 6
thesisenv/lib/python3.6/site-packages/setuptools-39.0.1.dist-info/WHEEL View File

@@ -1,6 +0,0 @@
Wheel-Version: 1.0
Generator: bdist_wheel (0.30.0)
Root-Is-Purelib: true
Tag: py2-none-any
Tag: py3-none-any


+ 0
- 2
thesisenv/lib/python3.6/site-packages/setuptools-39.0.1.dist-info/dependency_links.txt View File

@@ -1,2 +0,0 @@
https://files.pythonhosted.org/packages/source/c/certifi/certifi-2016.9.26.tar.gz#md5=baa81e951a29958563689d868ef1064d
https://files.pythonhosted.org/packages/source/w/wincertstore/wincertstore-0.2.zip#md5=ae728f2f007185648d0c7a8679b361e2

+ 0
- 65
thesisenv/lib/python3.6/site-packages/setuptools-39.0.1.dist-info/entry_points.txt View File

@@ -1,65 +0,0 @@
[console_scripts]
easy_install = setuptools.command.easy_install:main
easy_install-3.6 = 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_clib = setuptools.command.build_clib:build_clib
build_ext = setuptools.command.build_ext:build_ext
build_py = setuptools.command.build_py:build_py
develop = setuptools.command.develop:develop
dist_info = setuptools.command.dist_info:dist_info
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 = setuptools.command.upload:upload
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
python_requires = setuptools.dist:check_specifier
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


+ 0
- 1
thesisenv/lib/python3.6/site-packages/setuptools-39.0.1.dist-info/metadata.json View File

@@ -1 +0,0 @@
{"classifiers": ["Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Topic :: Software Development :: Libraries :: Python Modules", "Topic :: System :: Archiving :: Packaging", "Topic :: System :: Systems Administration", "Topic :: Utilities"], "description_content_type": "text/x-rst; charset=UTF-8", "extensions": {"python.commands": {"wrap_console": {"easy_install": "setuptools.command.easy_install:main", "easy_install-3.6": "setuptools.command.easy_install:main"}}, "python.details": {"contacts": [{"email": "distutils-sig@python.org", "name": "Python Packaging Authority", "role": "author"}], "document_names": {"description": "DESCRIPTION.rst", "license": "LICENSE.txt"}, "project_urls": {"Home": "https://github.com/pypa/setuptools"}}, "python.exports": {"console_scripts": {"easy_install": "setuptools.command.easy_install:main", "easy_install-3.6": "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_clib": "setuptools.command.build_clib:build_clib", "build_ext": "setuptools.command.build_ext:build_ext", "build_py": "setuptools.command.build_py:build_py", "develop": "setuptools.command.develop:develop", "dist_info": "setuptools.command.dist_info:dist_info", "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": "setuptools.command.upload:upload", "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", "python_requires": "setuptools.dist:check_specifier", "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"}}}, "extras": ["certs", "ssl"], "generator": "bdist_wheel (0.30.0)", "keywords": ["CPAN", "PyPI", "distutils", "eggs", "package", "management"], "metadata_version": "2.0", "name": "setuptools", "project_url": "Documentation, https://setuptools.readthedocs.io/", "requires_python": ">=2.7,!=3.0.*,!=3.1.*,!=3.2.*", "run_requires": [{"extra": "certs", "requires": ["certifi (==2016.9.26)"]}, {"environment": "sys_platform=='win32'", "extra": "ssl", "requires": ["wincertstore (==0.2)"]}], "summary": "Easily download, build, install, upgrade, and uninstall Python packages", "version": "39.0.1"}

+ 0
- 3
thesisenv/lib/python3.6/site-packages/setuptools-39.0.1.dist-info/top_level.txt View File

@@ -1,3 +0,0 @@
easy_install
pkg_resources
setuptools

+ 0
- 1
thesisenv/lib/python3.6/site-packages/setuptools-39.0.1.dist-info/zip-safe View File

@@ -1 +0,0 @@


+ 13
- 2
thesisenv/lib/python3.6/site-packages/setuptools/__init__.py View File

@@ -1,12 +1,14 @@
"""Extensions to the 'distutils' for large or complex distributions"""

import os
import sys
import functools
import distutils.core
import distutils.filelist
from distutils.util import convert_path
from fnmatch import fnmatchcase

from setuptools.extern.six import PY3
from setuptools.extern.six.moves import filter, map

import setuptools.version
@@ -15,11 +17,17 @@ from setuptools.dist import Distribution, Feature
from setuptools.depends import Require
from . import monkey

__metaclass__ = type


__all__ = [
'setup', 'Distribution', 'Feature', 'Command', 'Extension', 'Require',
'find_packages',
'find_packages'
]

if PY3:
__all__.append('find_namespace_packages')

__version__ = setuptools.version.__version__

bootstrap_install_from = None
@@ -31,7 +39,7 @@ run_2to3_on_doctests = True
lib2to3_fixer_packages = ['lib2to3.fixes']


class PackageFinder(object):
class PackageFinder:
"""
Generate a list of all Python packages found within a directory
"""
@@ -109,6 +117,9 @@ class PEP420PackageFinder(PackageFinder):

find_packages = PackageFinder.find

if PY3:
find_namespace_packages = PEP420PackageFinder.find


def _install_setup_requires(attrs):
# Note: do not use `setuptools.Distribution` directly, as

+ 39
- 15
thesisenv/lib/python3.6/site-packages/setuptools/_vendor/pyparsing.py View File

@@ -60,8 +60,8 @@ The pyparsing module handles some of the problems that are typically vexing when
- embedded comments
"""
__version__ = "2.1.10"
__versionTime__ = "07 Oct 2016 01:31 UTC"
__version__ = "2.2.0"
__versionTime__ = "06 Mar 2017 02:06 UTC"
__author__ = "Paul McGuire <ptmcg@users.sourceforge.net>"
import string
@@ -144,7 +144,7 @@ else:
except UnicodeEncodeError:
# Else encode it
ret = unicode(obj).encode(sys.getdefaultencoding(), 'xmlcharrefreplace')
xmlcharref = Regex('&#\d+;')
xmlcharref = Regex(r'&#\d+;')
xmlcharref.setParseAction(lambda t: '\\u' + hex(int(t[0][2:-1]))[2:])
return xmlcharref.transformString(ret)
@@ -809,7 +809,7 @@ class ParseResults(object):
return None
def getName(self):
"""
r"""
Returns the results name for this token expression. Useful when several
different expressions might match at a particular location.
@@ -1226,7 +1226,7 @@ class ParserElement(object):
def setParseAction( self, *fns, **kwargs ):
"""
Define action to perform when successfully matching parse element definition.
Define one or more actions to perform when successfully matching parse element definition.
Parse action fn is a callable method with 0-3 arguments, called as C{fn(s,loc,toks)},
C{fn(loc,toks)}, C{fn(toks)}, or just C{fn()}, where:
- s = the original string being parsed (see note below)
@@ -1264,7 +1264,7 @@ class ParserElement(object):
def addParseAction( self, *fns, **kwargs ):
"""
Add parse action to expression's list of parse actions. See L{I{setParseAction}<setParseAction>}.
Add one or more parse actions to expression's list of parse actions. See L{I{setParseAction}<setParseAction>}.
See examples in L{I{copy}<copy>}.
"""
@@ -1443,10 +1443,14 @@ class ParserElement(object):
def clear(self):
cache.clear()
def cache_len(self):
return len(cache)
self.get = types.MethodType(get, self)
self.set = types.MethodType(set, self)
self.clear = types.MethodType(clear, self)
self.__len__ = types.MethodType(cache_len, self)
if _OrderedDict is not None:
class _FifoCache(object):
@@ -1460,15 +1464,22 @@ class ParserElement(object):
def set(self, key, value):
cache[key] = value
if len(cache) > size:
cache.popitem(False)
while len(cache) > size:
try:
cache.popitem(False)
except KeyError:
pass
def clear(self):
cache.clear()
def cache_len(self):
return len(cache)
self.get = types.MethodType(get, self)
self.set = types.MethodType(set, self)
self.clear = types.MethodType(clear, self)
self.__len__ = types.MethodType(cache_len, self)
else:
class _FifoCache(object):
@@ -1483,7 +1494,7 @@ class ParserElement(object):
def set(self, key, value):
cache[key] = value
if len(cache) > size:
while len(key_fifo) > size:
cache.pop(key_fifo.popleft(), None)
key_fifo.append(key)
@@ -1491,9 +1502,13 @@ class ParserElement(object):
cache.clear()
key_fifo.clear()
def cache_len(self):
return len(cache)
self.get = types.MethodType(get, self)
self.set = types.MethodType(set, self)
self.clear = types.MethodType(clear, self)
self.__len__ = types.MethodType(cache_len, self)
# argument cache for optimizing repeated calls when backtracking through recursive expressions
packrat_cache = {} # this is set later by enabledPackrat(); this is here so that resetCache() doesn't fail
@@ -1743,8 +1758,12 @@ class ParserElement(object):
cap_word = Word(alphas.upper(), alphas.lower())
print(cap_word.searchString("More than Iron, more than Lead, more than Gold I need Electricity"))
# the sum() builtin can be used to merge results into a single ParseResults object
print(sum(cap_word.searchString("More than Iron, more than Lead, more than Gold I need Electricity")))
prints::
['More', 'Iron', 'Lead', 'Gold', 'I']
[['More'], ['Iron'], ['Lead'], ['Gold'], ['I'], ['Electricity']]
['More', 'Iron', 'Lead', 'Gold', 'I', 'Electricity']
"""
try:
return ParseResults([ t for t,s,e in self.scanString( instring, maxMatches ) ])
@@ -1819,7 +1838,7 @@ class ParserElement(object):
warnings.warn("Cannot combine element of type %s with ParserElement" % type(other),
SyntaxWarning, stacklevel=2)
return None
return And( [ self, And._ErrorStop(), other ] )
return self + And._ErrorStop() + other
def __rsub__(self, other ):
"""
@@ -2722,7 +2741,7 @@ class Word(Token):
class Regex(Token):
"""
r"""
Token for matching strings that match a given regular expression.
Defined with string specifying the regular expression in a form recognized by the inbuilt Python re module.
If the given regex contains named groups (defined using C{(?P<name>...)}), these will be preserved as
@@ -2911,7 +2930,7 @@ class QuotedString(Token):
# replace escaped characters
if self.escChar:
ret = re.sub(self.escCharReplacePattern,"\g<1>",ret)
ret = re.sub(self.escCharReplacePattern, r"\g<1>", ret)
# replace escaped quotes
if self.escQuote:
@@ -5020,7 +5039,9 @@ def infixNotation( baseExpr, opList, lpar=Suppress('('), rpar=Suppress(')') ):
constants C{opAssoc.RIGHT} and C{opAssoc.LEFT}.
- parseAction is the parse action to be associated with
expressions matching this operator expression (the
parse action tuple member may be omitted)
parse action tuple member may be omitted); if the parse action
is passed a tuple or list of functions, this is equivalent to
calling C{setParseAction(*fn)} (L{ParserElement.setParseAction})
- lpar - expression for matching left-parentheses (default=C{Suppress('(')})
- rpar - expression for matching right-parentheses (default=C{Suppress(')')})
@@ -5093,7 +5114,10 @@ def infixNotation( baseExpr, opList, lpar=Suppress('('), rpar=Suppress(')') ):
else:
raise ValueError("operator must indicate right or left associativity")
if pa:
matchExpr.setParseAction( pa )
if isinstance(pa, (tuple, list)):
matchExpr.setParseAction(*pa)
else:
matchExpr.setParseAction(pa)
thisExpr <<= ( matchExpr.setName(termName) | lastExpr )
lastExpr = thisExpr
ret <<= lastExpr

+ 14
- 1
thesisenv/lib/python3.6/site-packages/setuptools/build_meta.py View File

@@ -61,6 +61,19 @@ class Distribution(setuptools.dist.Distribution):
distutils.core.Distribution = orig


def _to_str(s):
"""
Convert a filename to a string (on Python 2, explicitly
a byte string, not Unicode) as distutils checks for the
exact type str.
"""
if sys.version_info[0] == 2 and not isinstance(s, str):
# Assume it's Unicode, as that's what the PEP says
# should be provided.
return s.encode(sys.getfilesystemencoding())
return s


def _run_setup(setup_script='setup.py'):
# Note that we can reuse our build directory between calls
# Correctness comes first, then optimization later
@@ -109,7 +122,7 @@ def get_requires_for_build_sdist(config_settings=None):


def prepare_metadata_for_build_wheel(metadata_directory, config_settings=None):
sys.argv = sys.argv[:1] + ['dist_info', '--egg-base', metadata_directory]
sys.argv = sys.argv[:1] + ['dist_info', '--egg-base', _to_str(metadata_directory)]
_run_setup()
dist_info_directory = metadata_directory

+ 1
- 1
thesisenv/lib/python3.6/site-packages/setuptools/command/bdist_egg.py View File

@@ -411,7 +411,7 @@ def scan_module(egg_dir, base, name, stubs):
return True # Extension module
pkg = base[len(egg_dir) + 1:].replace(os.sep, '.')
module = pkg + (pkg and '.' or '') + os.path.splitext(name)[0]
if sys.version_info < (3, 3):
if six.PY2:
skip = 8 # skip magic & date
elif sys.version_info < (3, 7):
skip = 12 # skip magic & date & file size

+ 1
- 11
thesisenv/lib/python3.6/site-packages/setuptools/command/build_ext.py View File

@@ -112,7 +112,7 @@ class build_ext(_build_ext):
and get_abi3_suffix()
)
if use_abi3:
so_ext = _get_config_var_837('EXT_SUFFIX')
so_ext = get_config_var('EXT_SUFFIX')
filename = filename[:-len(so_ext)]
filename = filename + get_abi3_suffix()
if isinstance(ext, Library):
@@ -319,13 +319,3 @@ else:
self.create_static_lib(
objects, basename, output_dir, debug, target_lang
)


def _get_config_var_837(name):
"""
In https://github.com/pypa/setuptools/pull/837, we discovered
Python 3.3.0 exposes the extension suffix under the name 'SO'.
"""
if sys.version_info < (3, 3, 1):
name = 'SO'
return get_config_var(name)

+ 3
- 1
thesisenv/lib/python3.6/site-packages/setuptools/command/develop.py View File

@@ -12,6 +12,8 @@ from setuptools.command.easy_install import easy_install
from setuptools import namespaces
import setuptools

__metaclass__ = type


class develop(namespaces.DevelopInstaller, easy_install):
"""Set up package for development"""
@@ -192,7 +194,7 @@ class develop(namespaces.DevelopInstaller, easy_install):
return easy_install.install_wrapper_scripts(self, dist)


class VersionlessRequirement(object):
class VersionlessRequirement:
"""
Adapt a pkg_resources.Distribution to simply return the project
name as the 'requirement' so that scripts will work across

+ 10
- 7
thesisenv/lib/python3.6/site-packages/setuptools/command/easy_install.py View File

@@ -40,12 +40,13 @@ import subprocess
import shlex
import io

from sysconfig import get_config_vars, get_path

from setuptools.extern import six
from setuptools.extern.six.moves import configparser, map

from setuptools import Command
from setuptools.sandbox import run_setup
from setuptools.py31compat import get_path, get_config_vars
from setuptools.py27compat import rmtree_safe
from setuptools.command import setopt
from setuptools.archive_util import unpack_archive
@@ -62,6 +63,8 @@ from pkg_resources import (
)
import pkg_resources.py31compat

__metaclass__ = type

# Turn on PEP440Warnings
warnings.filterwarnings("default", category=pkg_resources.PEP440Warning)

@@ -93,7 +96,7 @@ def samefile(p1, p2):

if six.PY2:

def _to_ascii(s):
def _to_bytes(s):
return s

def isascii(s):
@@ -104,8 +107,8 @@ if six.PY2:
return False
else:

def _to_ascii(s):
return s.encode('ascii')
def _to_bytes(s):
return s.encode('utf8')

def isascii(s):
try:
@@ -319,7 +322,7 @@ class easy_install(Command):
self.all_site_dirs.append(normalize_path(d))
if not self.editable:
self.check_site_dir()
self.index_url = self.index_url or "https://pypi.python.org/simple"
self.index_url = self.index_url or "https://pypi.org/simple/"
self.shadow_path = self.all_site_dirs[:]
for path_item in self.install_dir, normalize_path(self.script_dir):
if path_item not in self.shadow_path:
@@ -802,7 +805,7 @@ class easy_install(Command):
if is_script:
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')
self.write_script(script_name, _to_bytes(script_text), 'b')

@staticmethod
def _load_template(dev_path):
@@ -2049,7 +2052,7 @@ class WindowsCommandSpec(CommandSpec):
split_args = dict(posix=False)


class ScriptWriter(object):
class ScriptWriter:
"""
Encapsulates behavior around writing entry point scripts for console and
gui apps.

+ 34
- 25
thesisenv/lib/python3.6/site-packages/setuptools/command/egg_info.py View File

@@ -116,7 +116,33 @@ def translate_pattern(glob):
return re.compile(pat, flags=re.MULTILINE|re.DOTALL)


class egg_info(Command):
class InfoCommon:
tag_build = None
tag_date = None

@property
def name(self):
return safe_name(self.distribution.get_name())

def tagged_version(self):
version = self.distribution.get_version()
# egg_info may be called more than once for a distribution,
# in which case the version string already contains all tags.
if self.vtags and version.endswith(self.vtags):
return safe_version(version)
return safe_version(version + self.vtags)

def tags(self):
version = ''
if self.tag_build:
version += self.tag_build
if self.tag_date:
version += time.strftime("-%Y%m%d")
return version
vtags = property(tags)


class egg_info(InfoCommon, Command):
description = "create a distribution's .egg-info directory"

user_options = [
@@ -133,14 +159,11 @@ class egg_info(Command):
}

def initialize_options(self):
self.egg_name = None
self.egg_version = None
self.egg_base = None
self.egg_name = None
self.egg_info = None
self.tag_build = None
self.tag_date = 0
self.egg_version = None
self.broken_egg_info = False
self.vtags = None

####################################
# allow the 'tag_svn_revision' to be detected and
@@ -168,10 +191,12 @@ class egg_info(Command):
edit_config(filename, dict(egg_info=egg_info))

def finalize_options(self):
self.egg_name = safe_name(self.distribution.get_name())
self.vtags = self.tags()
# Note: we need to capture the current value returned
# by `self.tagged_version()`, so we can later update
# `self.distribution.metadata.version` without
# repercussions.
self.egg_name = self.name
self.egg_version = self.tagged_version()

parsed_version = parse_version(self.egg_version)

try:
@@ -254,14 +279,6 @@ class egg_info(Command):
if not self.dry_run:
os.unlink(filename)

def tagged_version(self):
version = self.distribution.get_version()
# egg_info may be called more than once for a distribution,
# in which case the version string already contains all tags.
if self.vtags and version.endswith(self.vtags):
return safe_version(version)
return safe_version(version + self.vtags)

def run(self):
self.mkpath(self.egg_info)
installer = self.distribution.fetch_build_egg
@@ -277,14 +294,6 @@ class egg_info(Command):

self.find_sources()

def tags(self):
version = ''
if self.tag_build:
version += self.tag_build
if self.tag_date:
version += time.strftime("-%Y%m%d")
return version

def find_sources(self):
"""Generate SOURCES.txt manifest file"""
manifest_filename = os.path.join(self.egg_info, "SOURCES.txt")

+ 11
- 3
thesisenv/lib/python3.6/site-packages/setuptools/command/register.py View File

@@ -1,3 +1,4 @@
from distutils import log
import distutils.command.register as orig


@@ -5,6 +6,13 @@ class register(orig.register):
__doc__ = orig.register.__doc__

def run(self):
# Make sure that we are using valid current name/version info
self.run_command('egg_info')
orig.register.run(self)
try:
# Make sure that we are using valid current name/version info
self.run_command('egg_info')
orig.register.run(self)
finally:
self.announce(
"WARNING: Registering is deprecated, use twine to "
"upload instead (https://pypi.org/p/twine/)",
log.WARN
)

+ 3
- 1
thesisenv/lib/python3.6/site-packages/setuptools/command/test.py View File

@@ -16,6 +16,8 @@ from pkg_resources import (resource_listdir, resource_exists, normalize_path,
add_activation_listener, require, EntryPoint)
from setuptools import Command

__metaclass__ = type


class ScanningLoader(TestLoader):

@@ -58,7 +60,7 @@ class ScanningLoader(TestLoader):


# adapted from jaraco.classes.properties:NonDataProperty
class NonDataProperty(object):
class NonDataProperty:
def __init__(self, fget):
self.fget = fget


+ 11
- 0
thesisenv/lib/python3.6/site-packages/setuptools/command/upload.py View File

@@ -1,4 +1,5 @@
import getpass
from distutils import log
from distutils.command import upload as orig


@@ -8,6 +9,16 @@ class upload(orig.upload):
in a variety of different ways.
"""

def run(self):
try:
orig.upload.run(self)
finally:
self.announce(
"WARNING: Uploading via this command is deprecated, use twine "
"to upload instead (https://pypi.org/p/twine/)",
log.WARN
)

def finalize_options(self):
orig.upload.finalize_options(self)
self.username = (

+ 56
- 12
thesisenv/lib/python3.6/site-packages/setuptools/config.py View File

@@ -7,7 +7,11 @@ from functools import partial
from importlib import import_module

from distutils.errors import DistutilsOptionError, DistutilsFileError
from setuptools.extern.six import string_types
from setuptools.extern.packaging.version import LegacyVersion, parse
from setuptools.extern.six import string_types, PY3


__metaclass__ = type


def read_configuration(
@@ -101,18 +105,18 @@ def parse_configuration(
If False exceptions are propagated as expected.
:rtype: list
"""
meta = ConfigMetadataHandler(
distribution.metadata, command_options, ignore_option_errors)
meta.parse()

options = ConfigOptionsHandler(
distribution, command_options, ignore_option_errors)
options.parse()

meta = ConfigMetadataHandler(
distribution.metadata, command_options, ignore_option_errors, distribution.package_dir)
meta.parse()

return meta, options


class ConfigHandler(object):
class ConfigHandler:
"""Handles metadata supplied in configuration files."""

section_prefix = None
@@ -280,7 +284,7 @@ class ConfigHandler(object):
return f.read()

@classmethod
def _parse_attr(cls, value):
def _parse_attr(cls, value, package_dir=None):
"""Represents value as a module attribute.

Examples:
@@ -300,7 +304,21 @@ class ConfigHandler(object):
module_name = '.'.join(attrs_path)
module_name = module_name or '__init__'

sys.path.insert(0, os.getcwd())
parent_path = os.getcwd()
if package_dir:
if attrs_path[0] in package_dir:
# A custom path was specified for the module we want to import
custom_path = package_dir[attrs_path[0]]
parts = custom_path.rsplit('/', 1)
if len(parts) > 1:
parent_path = os.path.join(os.getcwd(), parts[0])
module_name = parts[1]
else:
module_name = custom_path
elif '' in package_dir:
# A custom parent directory was specified for all root modules
parent_path = os.path.join(os.getcwd(), package_dir[''])
sys.path.insert(0, parent_path)
try:
module = import_module(module_name)
value = getattr(module, attr_name)
@@ -399,6 +417,12 @@ class ConfigMetadataHandler(ConfigHandler):

"""

def __init__(self, target_obj, options, ignore_option_errors=False,
package_dir=None):
super(ConfigMetadataHandler, self).__init__(target_obj, options,
ignore_option_errors)
self.package_dir = package_dir

@property
def parsers(self):
"""Metadata item name to parser function mapping."""
@@ -427,7 +451,19 @@ class ConfigMetadataHandler(ConfigHandler):
:rtype: str

"""
version = self._parse_attr(value)
version = self._parse_file(value)

if version != value:
version = version.strip()
# Be strict about versions loaded from file because it's easy to
# accidentally include newlines and other unintended content
if isinstance(parse(version), LegacyVersion):
raise DistutilsOptionError('Version loaded from %s does not comply with PEP 440: %s' % (
value, version
))
return version

version = self._parse_attr(value, self.package_dir)

if callable(version):
version = version()
@@ -479,16 +515,24 @@ class ConfigOptionsHandler(ConfigHandler):
:param value:
:rtype: list
"""
find_directive = 'find:'
find_directives = ['find:', 'find_namespace:']
trimmed_value = value.strip()

if not value.startswith(find_directive):
if not trimmed_value in find_directives:
return self._parse_list(value)

findns = trimmed_value == find_directives[1]
if findns and not PY3:
raise DistutilsOptionError('find_namespace: directive is unsupported on Python < 3.3')

# Read function arguments from a dedicated section.
find_kwargs = self.parse_section_packages__find(
self.sections.get('packages.find', {}))

from setuptools import find_packages
if findns:
from setuptools import find_namespace_packages as find_packages
else:
from setuptools import find_packages

return find_packages(**find_kwargs)


+ 23
- 22
thesisenv/lib/python3.6/site-packages/setuptools/dist.py View File

@@ -123,15 +123,6 @@ def write_pkg_file(self, file):
file.write('Provides-Extra: %s\n' % extra)


# from Python 3.4
def write_pkg_info(self, base_dir):
"""Write the PKG-INFO file into the release tree.
"""
with open(os.path.join(base_dir, 'PKG-INFO'), 'w',
encoding='UTF-8') as pkg_info:
self.write_pkg_file(pkg_info)


sequence = tuple, list


@@ -337,6 +328,12 @@ class Distribution(Distribution_parse_config_files, _Distribution):
distribution for the included and excluded features.
"""

_DISTUTILS_UNSUPPORTED_METADATA = {
'long_description_content_type': None,
'project_urls': dict,
'provides_extras': set,
}

_patched_dist = None

def patch_missing_pkg_info(self, attrs):
@@ -362,25 +359,29 @@ class Distribution(Distribution_parse_config_files, _Distribution):
self.require_features = []
self.features = {}
self.dist_files = []
# Filter-out setuptools' specific options.
self.src_root = attrs.pop("src_root", None)
self.patch_missing_pkg_info(attrs)
self.project_urls = attrs.get('project_urls', {})
self.dependency_links = attrs.pop('dependency_links', [])
self.setup_requires = attrs.pop('setup_requires', [])
for ep in pkg_resources.iter_entry_points('distutils.setup_keywords'):
vars(self).setdefault(ep.name, None)
_Distribution.__init__(self, attrs)

# The project_urls attribute may not be supported in distutils, so
# prime it here from our value if not automatically set
self.metadata.project_urls = getattr(
self.metadata, 'project_urls', self.project_urls)
self.metadata.long_description_content_type = attrs.get(
'long_description_content_type'
)
self.metadata.provides_extras = getattr(
self.metadata, 'provides_extras', set()
)
_Distribution.__init__(self, {
k: v for k, v in attrs.items()
if k not in self._DISTUTILS_UNSUPPORTED_METADATA
})

# Fill-in missing metadata fields not supported by distutils.
# Note some fields may have been set by other tools (e.g. pbr)
# above; they are taken preferrentially to setup() arguments
for option, default in self._DISTUTILS_UNSUPPORTED_METADATA.items():
for source in self.metadata.__dict__, attrs:
if option in source:
value = source[option]
break
else:
value = default() if default else None
setattr(self.metadata, option, value)

if isinstance(self.metadata.version, numbers.Number):
# Some people apparently take "version number" too literally :)

+ 1
- 1
thesisenv/lib/python3.6/site-packages/setuptools/extern/__init__.py View File

@@ -48,7 +48,7 @@ class VendorImporter:
# on later Python versions to cause relative imports
# in the vendor package to resolve the same modules
# as those going through this importer.
if sys.version_info > (3, 3):
if sys.version_info >= (3, ):
del sys.modules[extant]
return mod
except ImportError:

+ 0
- 18
thesisenv/lib/python3.6/site-packages/setuptools/monkey.py View File

@@ -75,8 +75,6 @@ def patch_all():
needs_warehouse = (
sys.version_info < (2, 7, 13)
or
(3, 0) < sys.version_info < (3, 3, 7)
or
(3, 4) < sys.version_info < (3, 4, 6)
or
(3, 5) < sys.version_info <= (3, 5, 3)
@@ -87,7 +85,6 @@ def patch_all():
distutils.config.PyPIRCCommand.DEFAULT_REPOSITORY = warehouse

_patch_distribution_metadata_write_pkg_file()
_patch_distribution_metadata_write_pkg_info()

# Install Distribution throughout the distutils
for module in distutils.dist, distutils.core, distutils.cmd:
@@ -111,21 +108,6 @@ def _patch_distribution_metadata_write_pkg_file():
)


def _patch_distribution_metadata_write_pkg_info():
"""
Workaround issue #197 - Python 3 prior to 3.2.2 uses an environment-local
encoding to save the pkg_info. Monkey-patch its write_pkg_info method to
correct this undesirable behavior.
"""
environment_local = (3,) <= sys.version_info[:3] < (3, 2, 2)
if not environment_local:
return

distutils.dist.DistributionMetadata.write_pkg_info = (
setuptools.dist.write_pkg_info
)


def patch_func(replacement, target_mod, func_name):
"""
Patch func_name in target_mod with replacement

+ 1
- 2
thesisenv/lib/python3.6/site-packages/setuptools/msvc.py View File

@@ -232,8 +232,7 @@ def _augment_exception(exc, version, arch=''):
elif version >= 14.0:
# For VC++ 14.0 Redirect user to Visual C++ Build Tools
message += (' Get it with "Microsoft Visual C++ Build Tools": '
r'http://landinghub.visualstudio.com/'
'visual-cpp-build-tools')
r'https://visualstudio.microsoft.com/downloads/')

exc.args = (message, )


+ 17
- 9
thesisenv/lib/python3.6/site-packages/setuptools/package_index.py View File

@@ -26,12 +26,13 @@ from setuptools.py27compat import get_all_headers
from setuptools.py33compat import unescape
from setuptools.wheel import Wheel

__metaclass__ = type

EGG_FRAGMENT = re.compile(r'^egg=([-A-Za-z0-9_.+!]+)$')
HREF = re.compile("""href\\s*=\\s*['"]?([^'"> ]+)""", re.I)
# this is here to fix emacs' cruddy broken syntax highlighting
HREF = re.compile(r"""href\s*=\s*['"]?([^'"> ]+)""", re.I)
PYPI_MD5 = re.compile(
'<a href="([^"#]+)">([^<]+)</a>\n\\s+\\(<a (?:title="MD5 hash"\n\\s+)'
'href="[^?]+\\?:action=show_md5&amp;digest=([0-9a-f]{32})">md5</a>\\)'
r'<a href="([^"#]+)">([^<]+)</a>\n\s+\(<a (?:title="MD5 hash"\n\s+)'
r'href="[^?]+\?:action=show_md5&amp;digest=([0-9a-f]{32})">md5</a>\)'
)
URL_SCHEME = re.compile('([-+.a-z0-9]{2,}):', re.I).match
EXTENSIONS = ".tar.gz .tar.bz2 .tar .zip .tgz".split()
@@ -235,7 +236,7 @@ def find_external_links(url, page):
yield urllib.parse.urljoin(url, htmldecode(match.group(1)))


class ContentChecker(object):
class ContentChecker:
"""
A null content checker that defines the interface for checking content
"""
@@ -297,7 +298,7 @@ class PackageIndex(Environment):
"""A distribution index that scans web pages for download URLs"""

def __init__(
self, index_url="https://pypi.python.org/simple", hosts=('*',),
self, index_url="https://pypi.org/simple/", hosts=('*',),
ca_bundle=None, verify_ssl=True, *args, **kw
):
Environment.__init__(self, *args, **kw)
@@ -933,12 +934,19 @@ entity_sub = re.compile(r'&(#(\d+|x[\da-fA-F]+)|[\w.:-]+);?').sub


def decode_entity(match):
what = match.group(1)
what = match.group(0)
return unescape(what)


def htmldecode(text):
"""Decode HTML entities in the given text."""
"""
Decode HTML entities in the given text.

>>> htmldecode(
... 'https://../package_name-0.1.2.tar.gz'
... '?tokena=A&amp;tokenb=B">package_name-0.1.2.tar.gz')
'https://../package_name-0.1.2.tar.gz?tokena=A&tokenb=B">package_name-0.1.2.tar.gz'
"""
return entity_sub(decode_entity, text)


@@ -980,7 +988,7 @@ def _encode_auth(auth):
return encoded.replace('\n', '')


class Credential(object):
class Credential:
"""
A username/password pair. Use like a namedtuple.
"""

+ 7
- 4
thesisenv/lib/python3.6/site-packages/setuptools/pep425tags.py View File

@@ -4,6 +4,7 @@
from __future__ import absolute_import

import distutils.util
from distutils import log
import platform
import re
import sys
@@ -11,6 +12,8 @@ import sysconfig
import warnings
from collections import OrderedDict

from .extern import six

from . import glibc

_osx_arch_pat = re.compile(r'(.+)_(\d+)_(\d+)_(.+)')
@@ -69,8 +72,8 @@ def get_flag(var, fallback, expected=True, warn=True):
val = get_config_var(var)
if val is None:
if warn:
warnings.warn("Config variable '{0}' is unset, Python ABI tag may "
"be incorrect".format(var), RuntimeWarning, 2)
log.debug("Config variable '%s' is unset, Python ABI tag may "
"be incorrect", var)
return fallback()
return val == expected

@@ -96,8 +99,8 @@ def get_abi_tag():
lambda: sys.maxunicode == 0x10ffff,
expected=4,
warn=(impl == 'cp' and
sys.version_info < (3, 3))) \
and sys.version_info < (3, 3):
six.PY2)) \
and six.PY2:
u = 'u'
abi = '%s%s%s%s%s' % (impl, get_impl_ver(), d, m, u)
elif soabi and soabi.startswith('cpython-'):

+ 3
- 12
thesisenv/lib/python3.6/site-packages/setuptools/py31compat.py View File

@@ -1,15 +1,6 @@
__all__ = ['get_config_vars', 'get_path']
__all__ = []

try:
# Python 2.7 or >=3.2
from sysconfig import get_config_vars, get_path
except ImportError:
from distutils.sysconfig import get_config_vars, get_python_lib

def get_path(name):
if name not in ('platlib', 'purelib'):
raise ValueError("Name must be purelib or platlib")
return get_python_lib(name == 'platlib')
__metaclass__ = type


try:
@@ -19,7 +10,7 @@ except ImportError:
import shutil
import tempfile

class TemporaryDirectory(object):
class TemporaryDirectory:
"""
Very simple temporary directory context manager.
Will try to delete afterward, but will also ignore OS and similar

+ 2
- 1
thesisenv/lib/python3.6/site-packages/setuptools/py33compat.py View File

@@ -10,11 +10,12 @@ except ImportError:
from setuptools.extern import six
from setuptools.extern.six.moves import html_parser

__metaclass__ = type

OpArg = collections.namedtuple('OpArg', 'opcode arg')


class Bytecode_compat(object):
class Bytecode_compat:
def __init__(self, code):
self.code = code


+ 2
- 1
thesisenv/lib/python3.6/site-packages/setuptools/script (dev).tmpl View File

@@ -2,4 +2,5 @@
__requires__ = %(spec)r
__import__('pkg_resources').require(%(spec)r)
__file__ = %(dev_path)r
exec(compile(open(__file__).read(), __file__, 'exec'))
with open(__file__) as f:
exec(compile(f.read(), __file__, 'exec'))

+ 1
- 1
thesisenv/lib/python3.6/site-packages/setuptools/site-patch.py View File

@@ -23,7 +23,7 @@ def __boot():
break
else:
try:
import imp # Avoid import loop in Python >= 3.3
import imp # Avoid import loop in Python 3
stream, path, descr = imp.find_module('site', [item])
except ImportError:
continue

+ 131
- 84
thesisenv/lib/python3.6/site-packages/setuptools/wheel.py View File

@@ -1,24 +1,29 @@
'''Wheels support.'''
"""Wheels support."""

from distutils.util import get_platform
import email
import itertools
import os
import posixpath
import re
import zipfile

from pkg_resources import Distribution, PathMetadata, parse_version
from setuptools.extern.packaging.utils import canonicalize_name
from setuptools.extern.six import PY3
from setuptools import Distribution as SetuptoolsDistribution
from setuptools import pep425tags
from setuptools.command.egg_info import write_requirements


__metaclass__ = type


WHEEL_NAME = re.compile(
r"""^(?P<project_name>.+?)-(?P<version>\d.*?)
((-(?P<build>\d.*?))?-(?P<py_version>.+?)-(?P<abi>.+?)-(?P<platform>.+?)
)\.whl$""",
re.VERBOSE).match
re.VERBOSE).match

NAMESPACE_PACKAGE_INIT = '''\
try:
@@ -50,7 +55,7 @@ def unpack(src_dir, dst_dir):
os.rmdir(dirpath)


class Wheel(object):
class Wheel:

def __init__(self, filename):
match = WHEEL_NAME(os.path.basename(filename))
@@ -62,9 +67,11 @@ class Wheel(object):

def tags(self):
'''List tags (py_version, abi, platform) supported by this wheel.'''
return itertools.product(self.py_version.split('.'),
self.abi.split('.'),
self.platform.split('.'))
return itertools.product(
self.py_version.split('.'),
self.abi.split('.'),
self.platform.split('.'),
)

def is_compatible(self):
'''Is the wheel is compatible with the current platform?'''
@@ -77,87 +84,127 @@ class Wheel(object):
platform=(None if self.platform == 'any' else get_platform()),
).egg_name() + '.egg'

def get_dist_info(self, zf):
# find the correct name of the .dist-info dir in the wheel file
for member in zf.namelist():
dirname = posixpath.dirname(member)
if (dirname.endswith('.dist-info') and
canonicalize_name(dirname).startswith(
canonicalize_name(self.project_name))):
return dirname
raise ValueError("unsupported wheel format. .dist-info not found")

def install_as_egg(self, destination_eggdir):
'''Install wheel as an egg directory.'''
with zipfile.ZipFile(self.filename) as zf:
dist_basename = '%s-%s' % (self.project_name, self.version)
dist_info = '%s.dist-info' % dist_basename
dist_data = '%s.data' % dist_basename
def get_metadata(name):
with zf.open('%s/%s' % (dist_info, name)) as fp:
value = fp.read().decode('utf-8') if PY3 else fp.read()
return email.parser.Parser().parsestr(value)
wheel_metadata = get_metadata('WHEEL')
dist_metadata = get_metadata('METADATA')
# Check wheel format version is supported.
wheel_version = parse_version(wheel_metadata.get('Wheel-Version'))
if not parse_version('1.0') <= wheel_version < parse_version('2.0dev0'):
raise ValueError('unsupported wheel format version: %s' % wheel_version)
# Extract to target directory.
os.mkdir(destination_eggdir)
zf.extractall(destination_eggdir)
# Convert metadata.
dist_info = os.path.join(destination_eggdir, dist_info)
dist = Distribution.from_location(
destination_eggdir, dist_info,
metadata=PathMetadata(destination_eggdir, dist_info)
self._install_as_egg(destination_eggdir, zf)

def _install_as_egg(self, destination_eggdir, zf):
dist_basename = '%s-%s' % (self.project_name, self.version)
dist_info = self.get_dist_info(zf)
dist_data = '%s.data' % dist_basename
egg_info = os.path.join(destination_eggdir, 'EGG-INFO')

self._convert_metadata(zf, destination_eggdir, dist_info, egg_info)
self._move_data_entries(destination_eggdir, dist_data)
self._fix_namespace_packages(egg_info, destination_eggdir)

@staticmethod
def _convert_metadata(zf, destination_eggdir, dist_info, egg_info):
def get_metadata(name):
with zf.open(posixpath.join(dist_info, name)) as fp:
value = fp.read().decode('utf-8') if PY3 else fp.read()
return email.parser.Parser().parsestr(value)

wheel_metadata = get_metadata('WHEEL')
# Check wheel format version is supported.
wheel_version = parse_version(wheel_metadata.get('Wheel-Version'))
wheel_v1 = (
parse_version('1.0') <= wheel_version < parse_version('2.0dev0')
)
if not wheel_v1:
raise ValueError(
'unsupported wheel format version: %s' % wheel_version)
# Extract to target directory.
os.mkdir(destination_eggdir)
zf.extractall(destination_eggdir)
# Convert metadata.
dist_info = os.path.join(destination_eggdir, dist_info)
dist = Distribution.from_location(
destination_eggdir, dist_info,
metadata=PathMetadata(destination_eggdir, dist_info),
)

# Note: Evaluate and strip markers now,
# as it's difficult to convert back from the syntax:
# foobar; "linux" in sys_platform and extra == 'test'
def raw_req(req):
req.marker = None
return str(req)
install_requires = list(sorted(map(raw_req, dist.requires())))
extras_require = {
extra: sorted(
req
for req in map(raw_req, dist.requires((extra,)))
if req not in install_requires
)
# Note: we need to evaluate and strip markers now,
# as we can't easily convert back from the syntax:
# foobar; "linux" in sys_platform and extra == 'test'
def raw_req(req):
req.marker = None
return str(req)
install_requires = list(sorted(map(raw_req, dist.requires())))
extras_require = {
extra: list(sorted(
req
for req in map(raw_req, dist.requires((extra,)))
if req not in install_requires
))
for extra in dist.extras
}
egg_info = os.path.join(destination_eggdir, 'EGG-INFO')
os.rename(dist_info, egg_info)
os.rename(os.path.join(egg_info, 'METADATA'),
os.path.join(egg_info, 'PKG-INFO'))
setup_dist = SetuptoolsDistribution(attrs=dict(
for extra in dist.extras
}
os.rename(dist_info, egg_info)
os.rename(
os.path.join(egg_info, 'METADATA'),
os.path.join(egg_info, 'PKG-INFO'),
)
setup_dist = SetuptoolsDistribution(
attrs=dict(
install_requires=install_requires,
extras_require=extras_require,
))
write_requirements(setup_dist.get_command_obj('egg_info'),
None, os.path.join(egg_info, 'requires.txt'))
# Move data entries to their correct location.
dist_data = os.path.join(destination_eggdir, dist_data)
dist_data_scripts = os.path.join(dist_data, 'scripts')
if os.path.exists(dist_data_scripts):
egg_info_scripts = os.path.join(destination_eggdir,
'EGG-INFO', 'scripts')
os.mkdir(egg_info_scripts)
for entry in os.listdir(dist_data_scripts):
# Remove bytecode, as it's not properly handled
# during easy_install scripts install phase.
if entry.endswith('.pyc'):
os.unlink(os.path.join(dist_data_scripts, entry))
else:
os.rename(os.path.join(dist_data_scripts, entry),
os.path.join(egg_info_scripts, entry))
os.rmdir(dist_data_scripts)
for subdir in filter(os.path.exists, (
os.path.join(dist_data, d)
for d in ('data', 'headers', 'purelib', 'platlib')
)):
unpack(subdir, destination_eggdir)
if os.path.exists(dist_data):
os.rmdir(dist_data)
# Fix namespace packages.
namespace_packages = os.path.join(egg_info, 'namespace_packages.txt')
if os.path.exists(namespace_packages):
with open(namespace_packages) as fp:
namespace_packages = fp.read().split()
for mod in namespace_packages:
mod_dir = os.path.join(destination_eggdir, *mod.split('.'))
mod_init = os.path.join(mod_dir, '__init__.py')
if os.path.exists(mod_dir) and not os.path.exists(mod_init):
with open(mod_init, 'w') as fp:
fp.write(NAMESPACE_PACKAGE_INIT)
),
)
write_requirements(
setup_dist.get_command_obj('egg_info'),
None,
os.path.join(egg_info, 'requires.txt'),
)

@staticmethod
def _move_data_entries(destination_eggdir, dist_data):
"""Move data entries to their correct location."""
dist_data = os.path.join(destination_eggdir, dist_data)
dist_data_scripts = os.path.join(dist_data, 'scripts')
if os.path.exists(dist_data_scripts):
egg_info_scripts = os.path.join(
destination_eggdir, 'EGG-INFO', 'scripts')
os.mkdir(egg_info_scripts)
for entry in os.listdir(dist_data_scripts):
# Remove bytecode, as it's not properly handled
# during easy_install scripts install phase.
if entry.endswith('.pyc'):
os.unlink(os.path.join(dist_data_scripts, entry))
else:
os.rename(
os.path.join(dist_data_scripts, entry),
os.path.join(egg_info_scripts, entry),
)
os.rmdir(dist_data_scripts)
for subdir in filter(os.path.exists, (
os.path.join(dist_data, d)
for d in ('data', 'headers', 'purelib', 'platlib')
)):
unpack(subdir, destination_eggdir)
if os.path.exists(dist_data):
os.rmdir(dist_data)

@staticmethod
def _fix_namespace_packages(egg_info, destination_eggdir):
namespace_packages = os.path.join(
egg_info, 'namespace_packages.txt')
if os.path.exists(namespace_packages):
with open(namespace_packages) as fp:
namespace_packages = fp.read().split()
for mod in namespace_packages:
mod_dir = os.path.join(destination_eggdir, *mod.split('.'))
mod_init = os.path.join(mod_dir, '__init__.py')
if os.path.exists(mod_dir) and not os.path.exists(mod_init):
with open(mod_init, 'w') as fp:
fp.write(NAMESPACE_PACKAGE_INIT)

Loading…
Cancel
Save